You should try resetting the SMC first and if that doesn't help you should probably take it in for service. It may be as simple as a bad battery or could also be a failed MagSafe circuit.
To resetthe SMC
Newer Mac portables with a battery you don't remove
Shut down the computer.
Plug in the MagSafe power adapter to a power source, connecting it to the Mac if its not already connected.
On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
Release all the keys and the power button at the same time.
Press the power button to turn on the computer.
Note: The LED on the MagSafe power adapter may change states or temporarily turn off when you reset the SMC.