I'm going to un-recommend SystemPanel though it does work. I heard Leo LaPort recommend an app called Watchdog that I think works better. I'm using the Lite version that's free in the Market.
Long story short, if you're getting crappy battery life your most likely culprit is a rogue app. A rogue app in this case is not an app that's out stealing your data or anything like that, it's merely an app that won't let your phone sleep. If you go to Settings >> About Phone >> Battery, you'll see at the bottom a meter that says Up Time and one that says Awake time. Up Time is the time your phone has been turned on. Awake time is the time your phone has been awake.
Unless you are constantly playing with your phone, making calls, sending texts, etc... and constantly touching the screen, these numbers should be different and usually pretty dramatically different. For example, your up time may be 12 hours, but your awake time may be 4 hours. That means that your phone has been turned on for 12 hours. During that 12 hours, you've spent 4 hours talking on the phone, texting, using apps, etc... and the other 8 hours you haven't been touching the phone so it's been in your pocket or wherever sleeping. Awake time should be less than Up time.
Rogue apps keep your phone from sleeping though so it is always awake and always running. This sucks battery life like a leech. Download Watchdog. Start it up and let it run for a couple of hours. Don't use any task killers. After a couple of hours, go into the Settings >> About Phone >> Battery page and look at the sleep time vs awake time. If the times are very, very close and you know you weren't actively doing anything with your phone for that amount of time, then you've got a rogue app. Go into Watchdog and go to the CPU panel. You'll see a list of apps. You'll see the name of the app and then a per cent next to it. It's usually pretty small unless you're actively using that app. If you see an app that's much higher than the rest, then uninstall that app, reboot the phone and see if the problem goes away. If it does, you've found your rogue app.