Lynette Labelle writes a list of seventeen reasons why an agent might reject your query letter. Obviously there is some overlap here between reasons your story is being rejected, but writing a query is a marketing skill in and of itself (a bit like writing a synopsis). You should flick through them yourself, but I've picked a few that I found entertaining or important enough to highlight. Seriously, who thinks addressing the query to the agent's pet is a good idea?
An attempt at being funny. Addressing the query to the agent’s dog, cat, child, or anything other than the agent herself isn’t funny or cute. It’s unprofessional. Don’t do it.
Comedy isn't easy, and most jokes have probably been done a million times. Resist the urge!
Jealousy or entitlement. This is when a writer complains that every member in her critique group has an agent or is published but her. Or she states in her query letter that she expects to receive an advance as big as a New York best seller and if the agent can’t get that for her, she’ll go somewhere else.
Entitlement is simply ugly. You are trying to convince the agent to work with you, so threatening them is counterproductive.
Multiple recipients. This is when you have the names of all the agents you’re contacting in the “to” section of your email. Agents know you’re sending queries to other agents, but they don’t like to be reminded of this.
Comes down to professionalism again...
Do check out both articles in case there's something in there you recognise in your own failed queries. And as always, RtFG*
NB: An entertaining look at the world of queries is the Slushpile Hell tumblr. I've noticed a lot of the problems Lynnette lists.
*Read the [Friendly] Guidelines