The fact about query letters is this: You only have about one to three minutes (sometimes even less) to convince an agent or editor that what you've written is worth publishing. You really must cut to the chase and make a great first impression. If you don't, your query will be tossed to the void, swallowed by the black hole of publishing (notoriously known as the rejection pile).
Before you even begin to write your query letter, however, you must have a clear idea about its purpose. In a nutshell, your query letter serves two functions: to enticingly tell the agent or editor what you have to offer (your novel manuscript), and to ask if he or she is interested in reading it.
With most unsolicited submissions, many agents and editors prefer you send the query letter either by itself or with a synopsis and/or a few sample pages from your novel (not more than 20). This is called a blind query or a pre-proposal query, because you're sending it without having been asked to send it. No matter what you call it, it's your brief and often only chance to hook the agent or editor on wanting to read your novel. If she likes your query, she'll call and ask for either specific parts of your novel proposal (a synopsis and three sample chapters, for example) or the entire manuscript. Then she'll make her decision.
We must emphasize that while some agents and editors prefer that you accompany your initial query letter with other parts of your novel proposal, such folks are few and far between. Typically, agents and editors want, need and accept only a query letter. Remember that more is less when it comes to sending unsolicited material. So keep your query short and to the point by limiting it to one page, two pages maximum (but often two pages is deemed way too long; it's your call, but shorter is almost always safer). And don't send anything else unless it's required or requested by the agent or editor (submission requirements are in the agent's or publisher's listing in the market books).
Whether you submit the query by itself or accompanying other material, your query letter is so vital. You must make it compelling, interesting, even funny-anything to make it outstanding to the agent or editor you're soliciting...