When my phone won't go to sleep, what is the best way to trouble-shoot what the problem and/or offending app is?
(In my case I am running CyanogenMod, and so I don't know if the solution will be the same or different than for stock Android)
First, look at which apps are runnng (including services). Then use Titanium Backup to freeze on of those apps (exclude regular system apps/services, unless you've determined nothing else is the culprit) and see if your problem stops. If you haven't found the offender, un-freeze and try another.
When your phone wont go to sleep, check for wakelock using apps. Programs like "Wakelock detector" will help you to do that. Good luck!
Reference: Wakelock , Wakelock detector
Settings -> Applications -> Development
on my Galaxy S until the 2.2.1 update, check there if you have it.