Few things are more important than having access to battery power when you need it. There are all sorts of useful devices that are powered by batteries, from flashlights to weather radios. Since the possibility of electricity failure after TEOTWAWKI is great, having a stock of batteries will help power the things you might need but cannot otherwise charge.
The first step in stockpiling batteries is to select the right ones. Know what your devices need rather than guessing. It may not seem like it, but there are a lot of different types of batteries on the market. They vary in shape, size (AA, AAA, D, C, 9 volt, etc.), and type (alkaline, lithium, nickel, etc.) and one battery does not exactly substitute for the next. Knowing what you require before you buy will save time, money, and potential failure when it becomes necessary to rely on batteries and you have the wrong ones.
Another important thing to keep in mind is that batteries weaken with age. That means paying attention to and understanding the date codes on batteries. These can vary widely, so research the type of batteries you need and the way those manufacturers mark their batteries since there will be a difference between types and brands of batteries. The life of a battery does not begin when you put it into a device and start using it; it actually begins when that battery is made so you want to avoid batteries that have been sitting on a shelf in a warehouse for years in order to get the maximum work load out of that battery. Likewise, you should avoid storing your own batteries for years and rotate stock instead.
When storing batteries, keep them in a cool, dark place. Temperature is another enemy of battery storage in that high temperatures can shorten their working life. On the other hand, storing them in a freezer will slow the loss of charge but moisture can increase the corrosion rate of batteries, so if you do place them in a freezer, keep them in an airtight container. To prolong the use of batteries in devices you use regularly, take batteries out at the end of each use as it is still possible for items to drain batteries even when switched off.
Alternatives to traditional batteries are rechargeables. These are really convenient in that you can simply toss them on the charger when their power dwindles. Charging does need to be monitored, however, as batteries can overheat and explode. While these batteries seem to last longer and have more life to give, the amount of recharges they offer is not infinite and they will lose their ability to hold power over time. You also have to remember that when the power goes out, you will not be able to recharge these batteries and will be back to square one in the position of needing batteries once again.
As nice as it is to have a stash of fewer batteries that are rechargeable than a stockpile of those that are not, both have pros and cons. They key is going to be figuring out what your specific needs are and how to best address those needs. In thinking about it, you may find that a little bit of both is what is in order to keep your items charged so you can constantly go about the businesses of making progress and moving forward.