Make sure your book is in the best possible shape before you query. Have it read by others. If a few of them have similar negative responses or questions, revise and have them read again. If there are no major consistent issues at this point you’re probably ready.
Follow the agency guidelines for submitting a query letter. As far as I know it’s always fine to send an email. Target agents who represent work that seems similar to yours or work that you are passionate about. Let them know if there is one book they represent that you particularly love (but probably only if you really, really love that book) Don’t query a second agent at the same agency if another agent there has rejected you. If you don’t specifically say that you are only sending to one agent exclusively, they will assume that you are sending multiple submissions. This is fine to do but if you have a special relationship with one agent you may want to offer an exclusive. Keep the letter brief (one page) and make sure it’s polished. Use "hook" language. Avoid gimmicks (like writing in the voice of the character for instance). There are exceptions to this. If it works, it works. But some people may be put off. Start with a brief one or two sentence summary pitch that includes the most relevant and captivating things about the book. Think: Who:character, What:Story problem—MOST IMPORTANT PART, When/Where: setting How: Your writing style, Why:Theme. Name the genre your book fits best into. If there isn’t one, pick the one that is closest. Possibly mention two but no more. Make sure to list your relevant and most captivating credentials, especially as they pertain to the book. Remember, though, this is secondary to the pitch and can possibly be left out. You may include a few sample pages (not attached, but at the bottom of the email) but don’t overdo this. Also, don’t rely on your pages to sell your book—your query letter is your major tool here! In the past, it was better not to mention a potential series when pitching a book but due to the popularity of series these days, you may want to briefly mention the POSSIBILITY of a series, making it clear that the book also can stand alone. If you don’t hear from an agent, check the website and see what their guidelines are (for example, some may say that if you don’t hear from them in X amount of time, they have declined). If there are no such guidelines wait about 3 months and then send the letter again, politely inquiring if they received it.
Here's a MADLIBS exercise to help you write your summary pitch:
CHARACTER NAME is a CHARACTER TRAIT/CHARACTER DEFINITION living in SETTING. But when STORY PROBLEM occurs or ANTAGONIST arrives everything changes. In this STYLE, STYLE novel AUTHOR writes about THEME.