On my Prospect Agency bio, it says that I would love to see a book about Lady Dracula or a high school teacher who finds herself falling for one of her students. You have NO IDEA how many query letters I've received about those topics and not one of them has caught my imagination. Usually what makes me sit up and take notice is when I read about an idea for a story that I never would have thought of, or for one that approaches a topic from a completely new angle. Then, regardless of whether or not it has been listed as one of my previous interests, I'm hooked. For instance, I'm not a big science fiction/fantasy person, but I would have LOVED to represent Seth Grahame-Smith, who wrote PRIDE AND PREJUDICE AND ZOMBIES and ABRAHAM LINCOLN: VAMPIRE HUNTER, because his ideas are sooo incredibly unique and interesting. When you hear the titles of his stories, you go, "Wait, what? That's awesome! I want to read that!"
So, when writing your query letter, highlight what it is that makes your novel unique and why it stands out from others in its genre. It is also important that the writing in your letter reflects the voice and style of your actual manuscript. I'm not saying to be gimmicky and pretend that the main character is writing the letter or anything like that; you just want the writing in your query to be as engaging as the writing in your book. Tell me who/what your story is about and draw me into the plot with captivating description. Do not summarize the entire story, but give me a couple short paragraphs to draw me in and make me want to know more.
Give your query letter as much consideration as you do your manuscript; don't just write it in 10 minutes and send it without taking time to reflect and revise. Have other people look it over for you and tell you what they think. Your query letter is just as important as your manuscript. Many agents will reject you and not bother to read any of your sample chapters (and I admit, I am one of them!) if you don't impress them with your query .
Make sure to include any relevant information about yourself, especially if you are a non-fiction author. Platform is INCREDIBLY important for non-fiction queries. Even if you have the best idea in the world for a non-fiction book, I will be hesitant to take you on if you have no related qualifications for writing it. I received a query letter from someone for a proposal for a non-fiction book on Razia Sultan, the first female ruler of India. The letter was well-written and I liked the idea, but the author had no background in Indian history or history at all. I can't remember, but I think he was a math professor.
As you can probably tell, to my mind, a lot of what makes your query great is your story. You have to have something captivating, unique, and well-written. Something that will stay with the agent (and the reader) long after they have finished reading. My favorite books are my favorites because of the impact they made on me and the connection I had with the story or with the characters.