First you must establish whether your batteries simply aren't holding a full charge or you are just using them too quickly. Check to make sure you are not wasting battery by turning off or disabling any unnecessary functions (LCD, turning down the screen's brightness, etc). If the battery is still having a problem, then you know for certain that it is not holding its charge.
Camera and electronic devices (notebooks and laptops included) are usually powered by lithium-ion (or li-ion) batteries. These rechargeable cells are usually very durable and last a long time. Like all other batteries (a car battery for example), there are chemicals inside that can only be charged a certain number of times. Once this limit has been reached, a battery will fail to maintain its power. This aging process occurs gradually over time. To reduce the aging effect during long-term storage, it is advised to store them in a cool location at a 40% charge.
Flash and Accessory Batteries
Flashes and other accessories usually use AA or AAA batteries. Depending on the device, alkaline (non-rechargeable) or rechargeable batteries (nickel-metal hydride, NiMH) will be better suited. For low-power devices like transmitters and PocketWizards (or other radio triggers), alkalines will last longer and save you money. On the other hand, rechargeable NiMH batteries are perfect for high-power flashes. These low-voltage (1.2 V) batteries deliver plenty of current to recycle the flash quickly and will last hundreds of cycles and can be used over and over again (800+ recharge cycles) saving you money in the long run.
Troubleshooting Tips for Batteries that Won't Hold a Charge
Make sure your charger isn't at fault. Do other batteries not gain a full charge?
Make sure your batteries are charged for a sufficient time before removing them from the charger. This goes without saying that they need time to get a full charge. Check your manual to determine just how long this is.
When working in cold weather, keep your batteries warm using hand warmers or by keeping them close to your body. Cold saps energy from batteries. How to Extend the Charge of Your Camera Battery will provide you with additional tips and tricks to help your camera battery last longer.
Do not buy too many spare batteries when you purchase your camera if you do not have a use for them (due to the aging effect described above). Buy a fresh one when you need it.
If you've tried everything and it is still not charging, it is just probably time to replace the battery. For tips on how to care for your digital camera batteries, read How to Take Care of Rechargeable Camera Batteries.