The Magsafe is a fantastic innovation, but it has made it slightly easier to disconnect your Mac from the AC outlet by accident without realising it. UnPlugged is a little free utility that notifies you via Growl when the power cord is disconnected.
Now it's true that if you're running a portable Mac the screen is set to dim automatically on battery power by default,