Some authors spend as much time on this page as they do their whole book.
There are whole work shops, websites and books focusing just on the query letter.
I’m going to give a brief list of basic dos and don’t and remind authors that every agent is different and has different tastes. There is no magic query that will appeal to all agents you just want to do the best letter for the agent of your choice.
Do say if you've been referred.
Do mention any previous publications or credentials.
Do target the right publisher or agent,
Do have the right address.
Do address your letter to a specific editor or agent
Do include your name, address, and telephone number.
Do be professional and brief in your query.
Do include a one or two sentence pitch or hook.
Do thank the agent or editor for reviewing your query.
Do include the title.
Do include if the work is fiction or nonfiction
Don't brag about how this book is the next big best seller.
Don't lie. Agents and editors do their homework.
Don't neglect basics of spelling, grammar.
Don't indulge in a long story synopsis.
Don't address your letter "To Whom it May Concern” or “Dear Agent".
Don't use tiny font.
Don't immediately send another email query if an agent has just rejected your first.
Don't use elaborate fonts or backgrounds.
Don't query more than one work at a time.
For more info see your dream agent’s website. They usually have tips on there. You can also check out the Query Tracker’s blog at: http://querytracker.blogspot.com/