Mark, of Cosmic Variance has some advice about Letters of Recommendation. There's lots of useful information in the posting but here's something that bears repeating.
Perhaps the most important thing for prospective graduate students in particular to keep in mind is that admissions committees, while certainly holding great power over individuals’ futures, are in fact desperately seeking good candidates, and are willing to overlook all kinds of blemishes, indiscretions, and specific weaknesses if they feel that they’re getting a fundamentally good candidate. A single specific fact about an application is very unlikely to ruin a person’s chances (you’d be amazed at the GRE scores of some students admitted to even the top programs). Rather, the committee tries to get an overall picture of the candidate, and then to rank them relative to other candidates (also taking into account the department’s research needs at a given time). Only then are admissions decision taken.
I have certainly missed some issues and subtleties here. But the basic idea should be clear and, if my own experience is anything like typical, then it should help some of you, particularly prospective graduate students, to understand what really goes on with letters. It is quite terrifying to ask people for letters and not to know precisely what’s said in them. Hopefully it helps to know that mostly, by far, you can rely on people to do what they can for you, without being dishonest (and this is important - you can’t expect them to write that you’re one of the best students they’ve ever seen if they don’t think that is the case).