I'm going to be a smart aleck here and say
WELL.
You write it well.
You address the person you are sending it to by NAME.
Yep that means you've got to do some research and find out who the person in charge of development and finding new projects is.
No, To whom it may concern, or Dear Sir. and Madame, ect.
You include a sharp, clear, interesting logline as the first paragraph.
Then you follow it up by one or two tight paragraphs giving just a bit more detail. Sentences designed to show your skill as a writer, hints at subplot or a major plot point. Not too much, just enough to hook.
If the script is a comedy then your query should produce a smile. It should show wit, humor, pacing. A dramatic story should inspire some feeling. Horror should indicate strong horror elements, etc.
You want to create in the reader a feeling that if they don't read your script they will be missing out on a very interesting story. You want them to stay up at night wondering "What will happen? How will the story work itself out? I must know!"
Then you end with My I send you the pages?
Edit it very carefully. No spelling or grammatical mistakes.
Go over it several times. Have some one proof read it.
I would format the letter as a formal buisness letter with your Contact info at the top and use a nice subtle stationary paper.