The folks at Upstart Crow have a swell little writer's toolbox. If you're struggling to write a query letter, do check out this annotated version. It tells you how you should format, what you should put where, and what you should look out for. (It's a PDF, so you'll need a reader.)
For the rest of the toolbox, click here.