I'm a battery fiend, so here's what I've noticed that helps with my battery:
First and foremost, pay attention to what apps you're using when the battery seems to drain fastest. There aren't many, especially if you stick to the popular apps, but there are a FEW that just WRECK your battery. Words with Friends being the most prominent example.
Second, make sure you have wifi OFF unless you're in an area with wifi, are connected to it and aren't leaving. When you leave the area, turn your wifi off (getting a widget/toggle for this is extremely helpful).
Airplane mode any time you're not getting a good signal. Your phone's going to keep searching to get that 1X up to 3G, and that's going to kill your battery life-- unless you really NEED to be receiving phone calls etc., put your phone in airplane mode.
In the battery settings, use battery saver mode.
YOUR SCREEN BRIGHTNESS is potentially the biggest killer of battery. Set it as low as you can and only change it manually when you need to. Auto is nice, but if you really want to save on your battery set it as low as you can and only change it yourself when it's necessary.
This is a biggie-- set all your apps to only sync/update information rarely. If you've got a facebook widget that's checking for new updates constantly, that's going to eat away at your battery fast. If you don't care about facebook/twitter/weather updates syncing automatically, just turn background data off. You'll see a big improvement. Otherwise set them to only update every few hours.
Widgets-- make sure you really need them. They eat at battery too, so if you can live without them, do. You'll see a big improvement if you go from 10 to 2 widgets, I promise.
If you need a one-time extra charge, you can look into bump charging (do a search, it's a little more than I want to get into on this post) but it's not great for your battery so don't do it all the time.
GPS-- oh you better believe this is going to kill your battery. Put a toggle button on your homescreen, turn it on when you need it, turn it off when you're done with it.
DON'T USE TASK KILLERS. Why? Another discussion that's best saved for another post (though we can talk about it if you want). Essentially, they use more battery than they save.
I've been told having screen noises and haptic feedback turned on hurts your battery, I haven't noticed any major difference myself but feel free to experiment.
--If you're getting really horrible, god awful battery life no matter what you do (3-5 hours), there could be an issue with your phone-- google it, ask on here with specifics, try debugging... but that's a totally different issue.
Uhh, let's see...
okay, rooting:
If you want to root your phone, congratulations on making the plunge. As far as I'm aware, here's how you can help your battery after rooting:
Underclocking/undervolting. Big advantage-- your phone uses less battery to accomplish the same tasks at the same speed (or slightly less battery to accomplish slightly faster speeds, or way less battery for slightly slower speeds... the choice is up to you!)
Removing bloatware-- doesn't make a big difference that I've noticed, but can't hurt.
Juice defender-- this is a great app for saving battery, IF it's right for you. Essentially it automates a lot of the things I've listed here, for instance it turns off connections when your phone is asleep, that kind of thing. I ended up removing it, because I thought it was worth the battery life to keep connections on while my phone was asleep... but you may feel differently. (I think it has an option to kill connections for a while, then turn them on to check for anything new periodically, then turn them back off). It has some other features, definitely check them out... the best thing for me was it would track battery usage and tell you if you were using more or less battery than previous usage.
And finally... extended batteries. Buy them, use them, love them. Or, you can go the cheapo route and get a second standard battery and just switch between the two whenever you get low.
These are all the biggest factors I've noticed for controlling your battery life. If anyone else out there has any other things of note, please, share!
p.s. oh, make sure there aren't any apps going that are keeping your phone awake when it shouldn't be.