Battle Droids are the weak sisters of the Separatist armies; while they possess the strength of numbers, individually they're astoundingly weak and will fall apart with little more than a nudge from your blaster rifle. Thermal detonators, although ineffectual against most droids, can destroy multiple battle droids when thrown into the middle of a group.
Super Battle Droids
Among the most annoying enemies in the game, SBD's are the droid army's equivalent of tanks; they're slow, but pack a powerful punch and are heavily armored. Although you start out the game seeing only single SBD's at a time, the game will quickly ramp up the difficulty by throwing multiple SBD's at you, or even laying down SBD dispensers, which pop out an infinite number of the things until destroyed.
The best way to get rid of an SBD is to hit it with an anti-armor round; a single round, if it hits the SBD directly, will instantly destroy it, so if possible, try to get one of your commandos into an anti-armor position when facing off against SBD's. Failing that, you can use EC grenades to stun them and gradually drain their life. If you place the grenade at the SBD's feet, you can compound the damage by unloading on it with blaster fire. Although the SBD's armor is highly resistant to blaster damage, you'll still usually hurt it enough to kill it, when you factor in the additional damage from the EC grenade. EC grenades are also useful for taking down multiple SBD's, especially when they're bunched up together.
If you're in truly dire straights, then you can also attempt to kill SBD's with your sniper rifle or thermal detonators. SBD's are vulnerable to position damage, meaning that you can shoot off various pieces of their armor and even their left arms, but this doesn't seem to make them any less deadly. It'll take you four or five shots to the head to kill an SBD with a sniper rifle, making this an inefficient method of disposal, but when you have a sniper position around, even a single soldier can usually hold off multiple SBDs for a good period of time. Thermals can also wear them down, but you'll notice that SBD's do have an energy shield that they'll put up when they spot a grenade incoming. Although EC grenades penetrate the shield, thermals do not, so you'll have to throw them a bit behind the SBD if you want them to take any damage. It'll still take four or five thermals to kill a single SBD, making them, again, fairly inefficient.
When it comes to offense, SBD's are among the most powerful enemies you're going to face off against. Their normal blaster fire can tear through your shield in seconds on hard mode, and they also wield a pair of more powerful attacks, both of which they have to "wind up" for. The most noticeable one occurs after they go to one knee for a second; if you see an SBD doing this, it's your cue to get behind cover. They can also smash you pretty good if you're within melee range. Even after they're dead, they can still hurt you; their upper bodies will often detach from their legs after they fall to the ground and continue firing, but luckily, these remnants are easily dispatched with normal blaster fire.
Although droidekas appear intimidating--few other droids could cause Jedi to run away, after all--they're less of a problem than you might think, at least in the world of Republic Commando. Obviously, they pack a bit of a punch thanks to their quad blaster array, but they aren't as damaging as SBD's are, and while their energy shield will protect them from damage, it can be overwhelmed with normal blaster fire. In this sense, their shield can be thought of as simply an extension of their normal health bar; if you shoot at them long enough, it'll drop, and you'll be able to finish off the robot inside with minimal trouble.
Of course, if you have the ammo reserves, you might also want to just use EC grenades on them; this will temporarily stun them and reduce the amount of blaster fire required to kill them. Anti-armor rounds can, of course, kill a droideka in one hit, but this is usually overkill, and you're better off saving those rounds for fights with SBD's.