Possibly a bad battery connector. Here's how to change it: Installing MacBook Core 2 Duo Battery Connector
According to if your's is an energy saver, here's the part: MacBook Battery Connector/Sleep Sensor (Energy Star)
Be sure to check the exact model number before buying.
Provides battery contacts and sleep sensor for logic boards with Energy Star printed at the second RAM... — 7 available at 69.95 each.