When they run out or… While it would seem the answer to this question is obvious, there are some cases when you shouldn’t wait until a battery is fully dead before replacing it. Here’s an example:
Many people use universal remotes and put the original manufacturer’s remote in a drawer. Ideally it’s best to actually remove the batteries from a remote you’re not going to use, but for the sake of convenience we often leave batteries in the remote, thinking that we might use it later. These remotes sit in a drawer for years untouched, and eventually the battery gives up. Unfortunately, that’s not the only outcome.
Changes in temperature and barometric pressure can affect batteries, especially the inexpensive ones provided by manufacturers. Just the span of time can as well. When the pressure inside a battery gets too great, the battery will “pop” and the acid inside will spill out. This is the white powder you’ve seen on old batteries. It can corrode the contacts in your remotes, it’s poisonous to you, and can even burn your skin if you leave it on. Not only that, it’s generally considered hazardous waste, containing manganese, cadmium, or other “heavy” elements.
You definitely want to replace the batteries in your devices before they “pop.” Sometimes this means every two years and sometimes a battery can go a much longer period. It generally has to do with the construction of the battery itself and how much pressure it can take. When you get those off-brand batteries with most consumer electronics, they aren’t as strong as name-brand batteries and that makes them more likely to break pretty quickly.
It’s a balance, especially if you’re one of those people who is committed to being friendly to the environment. The safest thing for you would be to get rid of those off-brand batteries and never use them, but that’s more waste that needs to be processed. It’s probably fair to go around the house once every so often and take remotes out of the drawer and replace the batteries.
One suggestion is to use a sharpie and write the year on the batteries when you put them in the device. Off-brand batteries should probably be replaced every other year while name brand ones can go three or four years before replacement unless they are kept outside. Excessive heat and cold shorten battery life immensely. Batteries that are kept in the garage or outside should definitely be checked every year for any signs that they are getting cracked or beginning to swell.
Rechargeable batteries are usually safe to leave until they go totally dead because they are designed to take the stress of recharging and have stronger outer casings. The strongest batteries are coin-style batteries. They are designed for stressful environments (such as your garage-door opener.) As a result, they will generally go dead long before they give up their inner acid.