How to pick a thesis advisor? This sort of question is probably in bad taste for math.stackexchange, but is probably in high demand. (I tried to start a site on Area 51 to house questions like this, but my request was closed due to the existence of math.stackexchange.)
I am advising talented students about graduate school. I believe that the most important thing one must be sure to do is pick the right PhD thesis advisor.

Question: What is your best advice on picking a good thesis advisor. (For the sake of levity, feel free to answer an opposite question regarding how to pick a bad thesis advisor. Just be sure you are clear whether you are indicating how to pick a good or bad advisor!)

 A: This is an interesting take: http://blogs.ams.org/mathgradblog/2010/11/17/the-minimalist-approach-to-an-advisor/ 
${}{}{}{}{}$
A: When sizing up a potential advisor it's helpful to chat with their current students, especially those nearing graduation.  How much help do they get, both in choosing problems to work on and in working on them?  How do they balance their desire for you to improve your thesis with your need to graduate in a timely manner?  How likely are they to make the effort to help you with your career (placement, tenure review) after you get your degree?
I could rattle off quite a few tragic cases, where extremely talented mathematicians of my generation were irrevocably derailed and are "flipping burgers" due to either failing to ask those questions or ignoring the answers they got.
A: My lecturer in homological algebra, Hal Schenck, has some advice on this http://www.math.uiuc.edu/~schenck/grad.html (item II in the list). I quote the relevant paragraph:
"1) Compatibility.
It is really important that you and your advisor get along well; grad school is difficult enough without having a chilly (or worse, hostile) relationship with your advisor. The best time to figure this out is BEFORE you ask someone if they'll work with you. One way to determine this is by taking a course with the person, and seeing how you interact when you go to office hours to ask questions. It goes without saying that you should make sure you do a good job in the class, because if you do poorly, it is likely that the potential advisor will not be interested in taking you on as a student.
2) Track record and reputation.
It is important that your advisor be respected as a scholar. You will quickly find that one of the first questions mathematicians ask a graduate student is: "and who is your advisor?". You may also want to find out how many theses the professor has directed, and how many students have dropped out (this should be done tactfully, of course, by talking to former students or the director of graduate studies). 
3) Good thesis topic.
Most professors supervising dissertations have a set of problems that they think might make an appropriate thesis; you should ask about this, 'cause getting a bad problem can cause you to waste years of your life."
A: I agree compatibility is the main thing to look for. Since we're assuming the student is talented and ambitious, the question to ask is "which professor thinks the most highly of me?" This can be hard to measure, because some people are naturally more or less bubbly or expressive, so spend time getting to know a prospective advisor mathematically through a reading course or mini-research project. Wait at least a full semester or so, and see how the meetings are going. Are they productive? Is the material interesting? Does the professor seem to like how you work? Is he or she becoming engaged and interested in continuing working with you?
Next, don't overthink it. As with all important life decisions, the outcome of this one depends largely on factors you can't hope to predict. Don't obsess too much about the status of your advisor, first because this is harder to gauge than you might think, and second because it's even harder to gauge how much this status will be used in your favor. Mathematical brilliance is a similar issue.
Finally, here is one major pitfall I've seen a number of friends fall into. Beware the charismatic lecturer! This is why I recommended a reading course. Of course many people are wonderful lecturers and also wonderful advisors, but many are also great on stage and then distant in person. Watch out for the advisor who keeps you at an arm's length, even if you loved the course you took with him or her.
A: I'm quite fond of the advice given in the article How to be good graduate student although it's actually aimed towards students of computer science. There's also a section on how to pick one's advisor. I think a link to this article was posted on mathoverflow some time ago.
