This article is from the Piano General Topics FAQ, by Isako Hoshino email@example.com with numerous contributions by others.
You will find differing opinions on this matter, but most
pianists will agree that practicing these exercises can help
your technique if you approach it with the correct attitude.
Don't simply race through all the notes; treat the exercises
as if they were real compositions, and give them just as much
attention to phrasing and dynamics. Also, try to find
exercises which pertain to the repertoire you are learning.
If you are studying a Bach fugue in E minor, for example,
careful practice of the E minor, G major, and neighboring
scales will help you much more than practicing the A flat
major scale. With Hanon exercises, you can increase the
difficulty by transposing the studies into different keys,
playing them backwards, playing one hand legato and the other
staccato, playing them in canon, etc. Be creative!