There could be an issue with the power cable or battery.
Or, it could also just need an SMC reset.
Also, check to be sure you aren't using a 60 watt adapter.
Those will generally charge MPBs, slowly, but can't sustain power to a system with a dead battery.
http://support.apple.com/kb/HT3964
If the SMC reset doesn't solve it, and it's an 85 Watt, take it to a store (both the system and adapter), and have them tested. Make an appointment first.