Any programs that do anything with the Internet, if you have a connection, will keep the machine awake. Also, make sure you have it set correctly for power adaptor vs. battery. This is a common mistake. If it is set correctly, try quitting all your programs and testing. If it still does not go to sleep, disconnect ethernet and/or turn off Airport and see what happens. It'll sleep eventually.
Steve