Charging or maintaining batteries with solar power is obviously a beneficial endeavor in a self reliant situation. A solar panel will put out power whenever there is sunlight on it, even on overcast days, though the output is reduced. The power is free, though the initial cost of the panel(s) may seem exhorbitant per watt. Solar cells are more efficient than they used to be, but nowhere near competitive per watt with grid power generated by other means. there are methods to charge both the small NiCad and NiMH, and larger lead acid battery types, thereby extending their usefullness for weeks, months, years. We will go over differing methods, and obviously differing costs and complexity.
The rechargeables, NiCad and NiMH, have AC and DC chargers available for them, as well as some purpose built solar chargers incorporating the solar panel as a lid to the battery storage compartment. These are not particularly high powered units, but they work. The AC chargers can be used with an inverter from a storage battery of some type, usually a lead acid type that can be charged with solar. While this is not an efficient method at all, it sometimes is expedient to do so. A DC input charger for the small batteries usually has a male lighter plug. This can be plugged into a car or truck lighter socket or power port as they are called now. There are also female lighter sockets available with alligator clips, that can be attached to any 12 volt lead acid battery to power the smaller charger, or anything else you might have that has a lighter adapter (camera, cell phone, spotlight, air compressor, etc.). Since the question will arise, generally you can't charge these small devices straight from a solar panel, even though the device is 12 volt input, and a solar panel is 12 volt output. There generally needs to be regulation of the solar panel, and we usually prefer an intermediary storage battery (5 amp hour SLA or larger), to provide stable current and voltage to the small device charger, since most devices won't tolerate the voltage and current variance that occurs with a solar panel and complete a charge cycle. Some device manufacturers have solar solutions already worked out.
Charging lead acid batteries with solar power is very common. It all boils down to size (and therefore, cost). There is maintenance level - replacing the internal discharge every battery is subject to, and bulk charging - actually replacing power (amp hours) you have consumed from a battery or pack. The processes and equipment are totally different. While a 2.5 watt panel will maintain a typical deep cycle marine (or starting) battery, or group 24 to group 31 size, if there are no drains on the battery, it won't develope any amps to replace used power. Nothing short of a 20 to 30 watt panel will generate enough power in a day to be of value, and one of these will only produce between 5 and 12 amps with decent sun. A typical deep cycle marine battery will be between 75 and 110 amps of capacity, so you can see the proportion. The bad part of solar is the initial cost (per watt). The good part is energy from the sun for the life of the panel for free (until they figure how to tax it). You can use the charged lead acid battery to run DC devices directly, AC devices with an inverter, or the chargers for other devices like NiCad batteries, cel phones, rechargeable spotlights, etc.
With all the energy tax credits, etc. available, you can offset some of the cost of a fairly substantial system now, utilizing it until you may need it. If you intend on running a refrigerator, stove, AC, heater, in any combination, you are looking at a large system. For a self reliant situation, lacking a large system, power usage is carefully monitored, and anything electric that doesn't need to be used, is not.
There are some decent foldable, military grade panels up to 55 watts (Global Solar is one manufacturer),
which can be very handy to have on hand if you don't have a permanent install, but they are expensive,
and the military frequently absorbs all production. PowerUp makes some unbreakable panels (stainless sheet
with solar material bonded to it, no frame) which can be knocked about and survive, and UniSolar used
to make some unbreakable panels (framed), that were very good for possible hazardous environments, but they
deferred production to large scale solar materials, and currently are not in production.
Any solar setup of 5 watts or larger should be used with a controller.
Some 2.5 watt panels to maintain starting batteries which are critical, like a standby generator, 4WD, etc., or any deep cycle marine batteries not in use, in standby by for emergency purposes. At least one larger 20 or 30 watt panel and controller, preferrably more than one, or larger panels to get some decent amperage. These can be in use for some purpose, as long as they are there, or in storage.