Hi,
As you must have read in the other posts here, if you want to charge a battery you have to have MORE voltage than the battery, and usually for a solar panel it has to be significant. As a rule of thumb, i would shoot for 2 times the voltage and 1/10 the ampere hour rating for the current. So for a 2AH 12v battery i would shoot for 24v panel at 200ma.
Just to be clear, to get these numbers we take the battery voltage and double it:
12 volts times 2 equals 24 volts,
and that gives us the open circuit panel voltage required.
Next, take the Ampere Hour rating of the battery and divide by 10:
2 Ampere Hours divided by 10 equals 0.2 which means 200 ma,
so we need a panel that can put out 200ma and has a 24v open circuit voltage rating.
Even so we have to hope that it charges well enough because there are other variables like the angle of the panel to the sun and cloud cover and stuff like that that is hard to control or predict. So the idea is to go with an overkill solution and that should at least work to some degree even though it might not be perfect.
Probably even a better number for the current would be to double that, to 400ma, and that would mean we get some charging even during periods of lower light levels.
This kind of approximation also helps us because the battery is often rated with a voltage number that indicates the discharging voltage, and the charging voltage can be higher. For a 12v lead acid for example, the charge voltage can be as high as 14.2 volts, so you can quickly see how a 12v panel would never be able to charge that kind of battery, we'd need at least 15 volts, and that is with a load current of 200ma not open circuit (open circuit is zero current in the panel where it is not charging the battery).
If you look around the web you can probably find load graphs of solar panels. As the load current increases, the voltage of the panel drops, so that is another reason why we have to shoot for a higher voltage panel than the battery. Twice the battery voltage is a good starting point, but a few volts lower than that could also work.
To get the most power out of the solar panel there is also a maximum power point on the panel curve which means at that voltage and current we get the maximum power we can ever get at the given sun light level. Sometimes this is controlled by changing the load with a control circuit to maintain the best load point. This gets a little complicated however because we have to add a control circuit and power converter.