Ah, the query. Your five second, foot stuck in the door, give it all you got, audition. Writers have lost sleep and hair follicles trying to get it right. Since subjectivity plays a huge role, each agent will be intrigued or discouraged by certain elements. However, there are definitely things you need to AVOID in your query letter.
1. Never write 'dear agent', or worse, another agent's name. And please, check the spelling.
2. Never mention how many rejections you've already received. Why would you do this? It's like asking someone to the prom by saying they were the only one left who hasn't said no.
3. Never say your book will be the next...Harry Potter or Twilight. That's why people don't sing Celine Dion or Barbara Streisand songs on American Idol. That's putting a lot of pressure on the rest of your query. It's fine to put in comp titles, but please avoid saying your book will blow away the planet as the next best seller.
4. Avoid rhetorical questions in your opening. It distracting, and the agent is going to assume your manuscript is the same. Also, it takes up precious word count. Just tell what the story is about.
5. Only add credentials that are pertinent to the story. It's great that your Aunt Mary loved the book, but unless your Aunt Mary is senior editor at a publishing house, leave it out.
A good query should have three things.
CHARACTER—your MC's age, name, and a sense of what they're like. Are they popular? Bossy? Superstitious? A total EMO but secretly crushing on the high school football star?
CONFLICT—what your character wants but can't have.
CRISIS—what will happen if your character does/doesn't go for what they want.
The first sentence should be the hook. Think of a tag line from a movie that's similar to your book. Then follow with the 3 C's and end with the cliffhanger. But the number one rule is BE SPECIFIC. After reading your query I should be able to answer the 3 C's.
Let's use Harry Potter and the Philosopher's Stone as an example.
Magic can change everything. Living with his spiteful Aunt and Uncle since his parents were killed in a car accident, eleven-year-old Harry Potter doesn't think being bullied by his cousin is inescapable, until he receives an invitation to Hogwarts School of Witchcraft and Wizardry.
He leaves his neglected home life for a castle full of moving staircases and secret passageways. Clueless about magic wands and spells, Harry desperately tries to fit in, and is shocked to find the other students already know his name. He learns his parents died protecting him from the most evil wizard in the world, The Dark Lord. Since that night, The Dark Lord had been rumoured to have died, unable to defeat baby Harry.
Harry's new found stardom—and natural skill with a flying broomstick—make him an instant hero at school. But fame comes with a price as Harry uncovers one of the professors is working to bring to Dark Lord back to power, and to finish what he started eleven years ago by finally killing Harry.
There are so many ways to write a great query for this story, this was just my take. Try it yourself.
One of the best things you can do for your query is give it to someone who knows nothing about your book. Querytracker is an excellent site...and it's free.