Ratfolk are humanoids with very ratlike traits... imagine Master Splinter from TMNT. They're small, agile, and very good at hiding, so they make extremely good Rogues and Ninjas. Their bonus to Dexterity also lends to ranged builds, and they have a racial Gunslinger archetype, so there is a lot you can do well with a ratfolk!
Ability Scores: +2 Dexterity, +2 Intelligence, -2 Strength. Ratfolk make extremely good Rogues, thanks to their small size and Dex bonus. They aren't particularly strong, though, so Strength-based melee builds are tough.
Size: Ratfolk are Small-sized, so they get a bonus to AC and Stealth, but at the cost of their speed.
Speed: Ratfolk have a base speed of only 20 feet.
Tinker: This ability gives ratfolk a bonus to some of the most useful skills in the game, Perception and Use Magic Device. The bonus to Craft (alchemy) can come in very handy for using poisons, as well.
Rodent Empathy: While you could build a character around making use of your +4 bonus to Handle Animal checks on rodents, I wouldn't recommend it. This is a nice skill boost for a Druid or Ranger, or any other character who takes an interest in mundane animals.
Swarming: This is one of the best racial abilities in the whole game. Two ratfolk can share the same square with no penalties, and when they do so, they're considered to be flanking an adjacent foe! WOW! No need to maneuver yourself into flanking position, just cuddle up to your buddy and go to town with the sneak attack damage! Of course, if you don't have any rat folk buddies, trade this out for something below.
Darkvision: Darkvision is excellent, and will come in very handy in those tight sewers or dungeons that your ratfolk character will want to hang out in.
Alternate Racial Traits:
Cheek Pouches [Swarming]: You can store items in your mouth, and remove them as a swift action. The swift action retrieval is good, but if you don't need to root around in your backpack frequently then skip it.
Cleanliness [Rodent Empathy]: +2 against diseases is pretty situational, but it's almost certainly more useful than Rodent Empathy.
Cornered Fury [Swarming]: A +2 bonus to attack rolls and AC when you don't have an ally nearby is really great, but it's just nowhere near as good as the Swarming ability. It's slightly better if you know for a fact that you're going to be the only ratfolk in your party, though.
Lab Rat [Tinker]: +1 bonus against poison, alchemic weapons, and saving throws, as well as the ability to double the duration of alchemic remedies. It's good, but probably not as good as tinker.
Scent [Tinker}: For a less skill-focused character, this is a decent option, since Scent will let you detect most invisible enemies. However, the skill bonuses are generally going to be better, and taking a PENALTY to most Perception checks probably isn't worth it.
Skulk [Tinker]: A sniping-focused character will definitely want this ability for the reduction in Stealth penalty when distracting a foe, but for pretty much any other character you should keep Tinker.
Surface Sprinter [Darkvision and Slow Speed]: This is a tough choice, trading out your darkvision for the ability to move at 30 feet. If you are a melee character who needs to quickly close then I would recommend it. Otherwise, stick with Darkvision.
Unnatural [Rodent Empathy]: Pretty much any character who isn't a Druid or Ranger should probably take this option, as most animals you come upon are going to be hostile to you anyway, and that +2 Dodge bonus to AC against them is well worth some ire from animals.
Alchemist: The bonuses from Tinker are perfect for an Alchemist, and you've got Dex and Int bonuses to go along with it. These things make ratfolk pretty much ideal for the Alchemist class, and the favored class bonus giving you an extra Discovery every six levels just puts you through the roof. This is a VERY good option!
Barbarian: The Strength penalty really hurts a good Barbarian build, but the Swarming ability still makes this an okay option, especially with the favored class bonus giving you even more bonus to attack rolls when using that ability. You may want to consider the Sharpclaw feat to give yourself two permanent claw attacks, to save your valuable rage powers for other things.
Bard: An Intelligence boost is nice for a Bard, but other than that there's nothing for or against you with this class.
Cavalier [Samurai]: I have trouble imagining a ratfolk Cavalier, and there doesn't seem to be any way to get a dire rat mount, so I think this is just a "meh" choice in general. Samurai could be cool, and I could definitely see a Sword Saint ratfolk Samurai panning out well.
Cleric: A lack of bonuses to Wisdom and Charisma hurts a well-optimized Cleric build, but the Animal domain with the Fur subdomain would get you increased movement speed and a dire rat companion, so that's one way to be super thematic. Overall, though, a suboptimal choice.
Druid: The Cave Druid archetype is perfect for a ratfolk Druid, and you can get a dire rat companion which gets some cool abilities as it progresses. If only you could give your companion your racial swarming ability! The stat bonuses are no help here, sadly, so it's still not the most optimal choice.
Fighter: The Dexterity bonus lends well to a Dex-based Fighter build, and of course the swarming ability is amazing for any melee class as long as there's at least one other ratfolk in your party. The seldom-used Cad archetype may be a good choice here, as I can imagine a ratfolk fighter using the dirty trick combat maneuver often. Obviously, an archer build would be excellent as well.
Gunslinger: Even more obviously than the Fighter, a ratfolk Gunslinger just plain works. You've got a Dex bonus, a Strength penalty that doesn't matter in the slightest, and a racial bonus to Craft (alchemy) and Perception, both of which are key for a Gunslinger. You won't have much use for swarming, so trade it out for cornered fury. The racial favored class option is excellent, giving you even more of an initiative bonus when you have at least one grit point (which you always should). There is also a really interesting racial archetype, the Gulch Gunner, available to ratfolk. This archetype focuses on attacking adjacent creatures with your gun (still provoking attacks of opportunity) to gain additional damage and other benefits, including regaining grit points. It's not going to be optimal, but it's flavorful and probably a LOT of fun to play!
Inquisitor: I could see a ratfolk making a decent Inquisitor, though the Wisdom penalty hurts a bit. The ratfolk's Small size makes the Infiltrator archetype a good choice, and picking up the skulk racial option will make this even more attractive.
Magus: Like any Small creature, ratfolk can make fine Dex-based Magi, and the bonus to Intelligence makes this an even better choice. Other than the size and Int bonus, there aren't any other racial options that are specifically good, though.
Monk: Ratfolk can make amazing Dex-based Monks, and if you combine the skulk racial option with their racial favored class option, which increases the speed at which a ratfolk Monk can move while using Stealth with no penalty, you can end up with an encredibly stealthy Monk who can sneak up on enemies and take them down quickly.
Oracle: With no bonus to Charisma and no racial abilities helping with spellcasting, this is neither a good nor bad option for a ratfolk.
Paladin [Antipaladin]: No bonus to Charisma, a Strength penalty, and Small size just makes Paladin a bad choice. You could always take one of the ranged Paladin archetypes, like Divine Hunter, but overall this class is just not going to make use of your excellent racial abilities. Same thing with Antipaladin.
Ranger: A stealthy Ranger build would shine for a ratfolk, and since dire rat is a default companion option, it would be very thematic as well. Sadly, the dire rat never becomes Medium size, so you can't use it as a mount unless you use reduce person on yourself. If you did so, however, the racial favored class option would probably be worth your time, since you would then be giving your companion a bonus to CMD whenever you were mounted. You'd want to use a reach weapon in that case, of course.
Rogue [Ninja]: Ratfolk were pretty much made to be Rogues thanks to the swarming racial ability. As soon as you get two ratfolk Rogues in a party, they'll pretty much always get their sneak attack damage since they can just occupy the same square to get it. Toss in the Cutpurse archetype and you'll also be able to steal something from the target while dealing damage as well. The favored class bonus isn't that great, since Escape Artist checks doesn't come up that often (though they can be used to escape from a grapple, so that can come in handy). Ninja is just as good as Rogue for a ratfolk, though a Charisma bonus would have been really nice.
Sorcerer: I find myself wishing very often that there was a Paizo-made lycanthrope Sorcerer bloodline, because it would be extremely thematic for something like a ratfolk Sorcerer. As it is, without a Charisma bonus there's pretty much no reason to be a Sorcerer instead of a Witch or Wizard as a ratfolk. If you take the Sage bloodline, this becomes blue instead of green
Summoner: As with the Sorcerer, I just don't see why you'd choose Summoner over Witch or Wizard to make use of the Int bonus. The favored class bonus really isn't very useful since poisons are rarely a huge issue for an eidolon.
Witch: Now here's a good option. Ratfolk get a bonus to Int which means your hexes are going to be powerful. On top of that, the favored class option is really amazing, letting you add range to your hexes that normally would only go to 30 feet (note that you can apply this bonus to several different hexes, as there's no requirement that you pick one hex and keep increasing its range). You can start off with a rat familiar and upgrade it to a dire rat as early as 3rd level using Improved Familiar, or a ratling starting at 7th level (though you need to be chaotic evil to get access to the ratling, don't forget).
Wizard: While Wizard is a very good choice for a ratfolk (for the same reasons that Witch works well) I would say the Witch is a slightly better choice because of the favored class bonus.
Racial Favored Class Options:
Alchemist: Discoveries are an Alchemist's best friend, and getting more of them is always great. Good option.
Barbarian: Holy crap, you get to increase your flanking bonuses while swarming? Ok so this requires that there be another melee ratfolk in your party, but seriously, this is golden.
Druid: Ignore this and take a skill point or hit point. Wild empathy just isn't all that useful, and this only works for creatures normally found underground.
Fighter: Bull rush attempts don't come up that often, though grappling is pretty common. This is a so-so option compared to a hit point, in my opinion.
Gunslinger: Getting even more added to your Initiative rolls is a solid option. I would take this every level.
Monk: If you're building a stealthy ratfolk Monk, this is a great option, otherwise ignore it.
Ranger: I have trouble seeing a situational bonus to your animal companion's CMD as better than a hit point in most situations, so I'd probably ignore this one.
Rogue: While not the best bonus ever, Escape Artist checks can come up pretty often, so this can be good for getting out of grapples. This is a maybe for me.
Summoner: Your eidolon just isn't going to be poisoned that often for this to be worth it, unless you build it with a terrible Fortitude save.
Witch: Adding range to hexes is golden. You should take this at every level, spreading it out between your favorite hexes that normally have 30 ft. ranges.
Arcane Trickster: I like the Arcane Trickster for a ratfolk, since their Intelligence bonus will keep their spellcasting relevant while the swarming ability will let them get into melee when necessary and do some damage.
Gray Warden: The Gray Warden prestige class is like taking an Inquisitor and a Rogue, mashing them together and taking all the best bits to make a new class. It's awesome for a ratfolk Inquisitor or Cleric!
Burrowing Teeth: A burrow speed is one of those things that a GM will forget about, letting your character be truly in the spotlight when you can bypass a door simply by burrowing through the dirt under it. This is a great option for a ratfolk Rogue or Ranger who wants to be able to scout ahead in ways no other character can. Remember that it does require the Sharpclaw feat (below) as a prerequisite.
Gnawer: Funny and interesting, good for bank robbers people wanting to get through doors. Your bite attack is slightly improved, and you gain the ability to eat through solid rock very slowly. You'll probably find plenty of use for this in a dungeon.
Shared Stash: You can share equipment with those you are swarming with. It's cool, but entirely avoidable.
Sharpclaw: Claw attacks can come in handy (especially since they can't be disarmed) and this feat is a prereq for Burrowing Teeth, so it's probably worth your time.
Sharptooth: A bite attack as well! With this and sharp claw you can become a natural attack focused rogue.