all pets have three statistics: health, power, and speed. health obviously is how much damage it can take before it dies, power is how hard it hits or how well it heals, and speed determines who goes first in a given round. having higher value stats means a pet is more likely to defeat its opponent, and winning is good, so that's why we give a darn. several factors go into determining a pet's stats, most of which i'm not gonna talk about a lot today. species is one - turtles tend to have more health, birds tend to have more speed, and so on. pet level is another - every time a pet levels up, its stats go up. there is some variation amoung individuals of the same species (nancy the scorpion might have a little more power than doug the scorpion, but less health, for example). and then there's the thing i wanna talk about today: quality. sometimes, crazy dave the tundra penguin is just plain a better fighter than mad mortimer the tundra penguin.
world of warcraft has always a quality system for gear: rare/blue is better than uncommon/green, and so on. pets received a similar design. all else being equal, a rare fire beetle has higher stats than an uncommon fire beetle, which has higher stats then a common, which has higher stats than a poor. (currently, player-owned cannot be higher than rare, but some of the master pet tamer npcs have epic or even legendary pets.) at level 1, the difference between a poor and a rare isn't very noticeable, but as pets level up these differences grow and grow until a level 25 rare can easily smash a level 25 poor.
so, how do you know what the quality of your pets is? once you've captured a pet, the game will tell you what it is in the pet journal, but the only way to know before you decide to start flinging traps is to look at its stat values and make a guess. there are however a number of add-ons which can tell you what the quality of a pet your fighting is. i personally like battlepetcount, which also tells you if you already own a pet of that type, and what its level and quality are, but there are plenty of others. it looks like patch 5.1, which will be landing before too long, will report the quality of pets you are battling as part of the standard interface, which will a nice improvement.
pets that you've acquired through any other method than capturing them in the wild (quest rewards, drops, purchased, etc.) are slightly different. for one thing, they are never poor or common. for another, the default game interface currently gives no information at all as to whether they are uncommon or rare, even when they are in your journal. add-ons will tell you, or you can look them up on warcraftpets.com. or, if you're a lazy-arsed git like me, you can fall back on some rules of thumb. if it came from a real-money transaction, the darkmoon fair, the molten fron, the guild vendor, or a low probability drop, it's probably a rare. if it was a quest reward, crafted by a player, or bought at the argent tournament, it's an uncommon. i think that covers most of them.
should you farm wild pets until you get a rare, and throw away the rest? hell if i know - it depends on what you want to do. if your goal is to pvp or fight the master pet tamers, then yeah, maybe, if its a hard to get species, like humanoid or dragonkin. harder to justify for a critter, since you'll get like a bajillion rare critters in pandaria without trying. if your goal is to have a cool looking baby ape or minfernal to follow you around while you do tillers dailies, then no, probably not worth it. howver, my position on this and every other aspect of pet battling is that there is no wrong way to do it.
update: anonymous points out that the red cricket, awarded from becoming best friends with the tiller sho, is not automatically uncommon or rare, but instead is apparently given a random quality like captured pets, and can therefore be poor or common. a little digging shows that the sapphire cub, created by jewelcrafters, also has a random quality. i'm inclined to suspect that these are bugs rather than what blizzard intended, but there's no official word as to why these are different. lotta folks pissed about getting shafted with a crappy cricket, though.