The Guide to Literary Agents has all the information you need. First, make a list of your criteria. By now you should know how to describe your own work, your genre and where you fit into it. Do you write fiction or nonfiction? Mystery or romance, thriller or fantasy, contemporary or historical? Are you a new writer who may need editorial help from time to time, or an MFA who only needs a contract negotiator? Second, comb through the Guide and make a list of agents who fit your criteria. Agents will tell you, if you read their blurb in the Guide, exactly what they do, what sort of writing they represent, and how they want you to approach them. (A word of caution here: if an agent wants three hundred dollars up front to read your manuscript, dont fall for it. Please dont feed the sharks.)
If your style resembles the style of a known writer then say that, but only if its true. If its not true an agent will know it, and then it counts against you. And dont tell an agent in your cover letter that youve written the next Left Behind or Purpose Driven Life. Thats what they all say. You want to stand out, not stand in line.
Follow directions. If an agents blurb says No phone queries, then a phone call is the surest path to rejection. Query only means a letter only one or two pages in a business envelope. Fifty pages means fifty pages. If Chapter 3 ends on page 52 then, okay, send 52 but not six hundred. And dont forget the SASE. If an agent goes to the trouble of listing specific instructions in several different directories and a website shes not going to say yes to someone who doesnt bother to read them.
Its pretty simple, really. The way to an agents heart is through a good book, presented with accuracy, clarity, and professionalism.