By nature of not personally knowing the person you are querying (like cold calling), you must be respectful. Which leads to formal. So, business formal (like business casual, but with better pressed pjs--er, pleats).
But I don't want to talk about queries. I did that in January (if you missed it, this dandy little thingy over here ---> has an archive of past posts, so look for January Query topics).
What I love about this business--the wonderful world of words--is that it is rather casual. At what other sort of conference will you be stopped on the way to the bathroom to be pitched? (by the way, May's topic shall be conferences, but as forewarning, please try to refrain from stopping agents on the way to the bathroom--and don't pitch in the bathroom)
We are all equal parts artists, business men and women, and fan girls (yes, boys, you too). The trick is to balance all three, to know when to bring them out and when to reign them in. Queries, Twitter, phone calls, conferences, blogs, chat boards, etc. You are always being watched, and judged. If you are too formal all the time, seeing every connection only as a means to the top, you won't be well liked. If you're only a fan girl and way too silly all the time, you won't be taken seriously. If you only care about your art, feeling that it will sell itself and therefore you don't have to put any effort into marketing it or yourself, you won't be noticed and probably tossed aside as, again, un-serious.

So this is really what I mean when I say that a query isn't a business letter (though it is) or that conferences are really casual (even though we're all conducting business).
Strike the balance. Play the game. Find a happy harmony. And take a really long nap when you get home.
Happy writing!