The first round, I queried only agents who represented authors I had read, enjoyed, and whose work I thought had some similarity to my own (in subject matter, tone, style, etc.). To find those agents, I looked at my bookshelf and made a list of all the authors whose agents I wanted to find. Then I used Publishers Marketplace to search for deals by those authors. I got several agent names that way. However, many of the authors didn't have deals posted. For those, I'd check their official websites (some authors mention their agent in their bio, FAQ, or contact info) and google "author name" and the word "agent" together to see if that came up with anything.
Despite my best efforts, I never found out who represented some of the authors on my list. And some of the agents I did identify weren't open to queries, or weren't looking for YA at the time. I ended up querying eight agents, all by snail mail (I didn't want to do e-queries because I was about to go away for three weeks on vacation, so I knew I might not be able to answer any immediate responses).
The next round (which happened about four months after the first because I was moving, but usually I'd only have waited two or three) I looked more broadly. I queried a couple of agents I'd come to like and respect from their internet presence (Kristin being one of those), but most of the agents I queried I found through Agent Query. I did a search for agents who represented young adult fiction (no other qualifiers). I passed any listing that said the agent wasn't accepting queries at the time, and all the others I read.
Whether I decided to query that agent depended on a variety of factors, including: had I heard good things about the agent from other authors? had I heard of the agent and/or their agency, period? had they sold any YA books in the last year (if they didn't list their sales at the site, I'd cross-reference at Publishers Marketplace)? were those YA books in my genre or similar? had I heard of those books or their authors? were the books sold to reputable publishers? did the agent represent genres I was likely to be writing in (e.g., fantasy, science fiction) or, on the other hand, express that they didn't want those genres?
My criteria wasn't totally set. Some of it was just impressions. But generally, if an agent had sold at least one YA in a related genre in the last year to a reputable publisher, I probably queried them. Although if they had only sold the one YA, and I'd never heard of it or the author, and I hadn't heard anything about the agent or agency before, I probably left them for the third round, unless they made a comment in their listing or on their website that they were specifically looking for books similar to mine. I also queried some agents who hadn't sold YA in my genre, but expressed an interest in it, as long as I'd heard good things about them/they repped authors I knew of/they had a lot of sales/etc. I did about 50/50 snail mail/e-queries, about 25 queries in total.
I'll note here, because it was part of the original question--I only really paid attention to whether the agent repped YA or not. As long as they repped YA, I didn't worry about whether they also handled MG (which I may write at some point, but that's not certain, so it didn't seem important to worry about it now) or adult fiction (which I doubt I will ever write, as novels go).
The third round happened about three months after the second, mostly because I was getting a little anxious because in a few weeks three agents had turned down the full (with simply "I didn't fall in love with it" or "not right for me"). I wanted to feel I'd given the book every chance, so I searched more in depth to see if there were any agents I'd missed who would be worth querying. I queried a few of the agents from agencies where I'd gotten rejected by a different agent and I queried a few of the agents I'd almost queried in the second round. I also browsed the agent news and response times forums at Verla Kay's message board, where I found several agents who weren't listed on Agent Query, or whom I'd overlooked there because there wasn't enough information, whom board members had good experiences with and shared additional info on. Any agent people mentioned whom I hadn't heard of before, I checked on their websites and/or Publisher's Marketplace to make sure they had recent, relevant sales. This round I only did e-queries, about 15.
About two weeks after the third round, I got the offer-of-representation call, and, well, no more querying for me!