How do I determine the correct position for my bicycle seat? I have been suffering from IT band problems on my outer knee, which I'm pretty sure were caused by raising my seat height too much. I raised the seat on the advice of a friend who said that a higher seat gives more power in each stroke.

By trial and error over several months I have found a (lower) seat height that seems to be acceptable, but I still get occasional twinges if I cycle a lot, so I suspect it's still not quite right.

Is there a well-understood way to correctly determine the best height for a bicycle seat? Are there factors other than seat height that are important to consider?
For a quick fit, the general goal is to keep the seat high enough that you can get a nearly-full leg extension, without 'locking' the knee.

Over a long period of time, if you find that you are having knee, foot or hip pains, try making small adjustments with the saddle, about 0.5-1.0cm at a time, either up, down, forwards or backwards. If the pain gets worse, try the other direction. Give it some time, and eventually you should find a painless position.

A tip I recently got from a friend having a similar problem proved interesting: Those of us who are males typically 'dress' right  or left. For him, aligning his saddle with the nose turned slightly off-center (away from the direction of 'dressing') alleviated all of his knee discomfort!