As you may know, there are many ways you can take out warthogs.
1. The Rocket launcher - This is the main reason you should use in RL at all. Say, you're doing Sidewinder and you're on one of the teleporter ledges. You see a warthog and you shoot a rocket. Chances are, you probably missed. It can be very difficult to hit a warthog from a distance. That is why you should use it when a warthog/vehicle is somewhat close to you. Just remember, even if you hit the warthog, it will only kill the driver, and then you can kill off the gunner/passenger (if there are any).
2. The Plasma pistol/any other weapon - The PP can take out the driver's entire shields. Yeah, that's right. So use it to that advantage and preferably give the driver of that warthog a taste of your 8 gague shotgun, or whatever weapon you're wielding. But the shotgun should be used with the PP for taking out hogs.
3. The frag grenade - I would find this somewhat easier. :/ Shoot at the warthog until you've probably taken out a good chunk of their shields (use the assault rifle). When the warthog is about 20 feet away from you, throw a frag at the ground and you may want to step aside. Otherwise, the hog will probably go flying into you. You can also stick a hog, but I'm not sure if it will be a guaranteed kill, so at least bring some of their shields down with the pistol/assault rifle.
4. Sniper rifle/pistol - With the sniper, you can take out the driver in one shot. You can easily do a lot of damage from the driver's side of the warthog.
Just remember with the first and third ideas, to be careful NOT to get in the driver's paths. ;)