For proper maintenance of a lithium-based battery, it’s important to keep the electrons in it moving occasionally.
Apple does not recommend leaving your portable plugged in all the time. An ideal use would be a commuter who uses her notebook on the train, then plugs it in at the office to charge. This keeps the battery juices flowing. If on the other hand, you use a desktop computer at work, and save a notebook for infrequent travel, Apple recommends charging and discharging its battery at least once per month. Need a reminder?
Add an event to your desktop’s iCal. When your battery no longer holds sufficient charge to meet your needs, you may choose to replace it. If your notebook came with a built-in battery, you should have the battery replaced only by an Apple Authorized Service Provider.