A simple solar panel wiring circuit
The simplest possible solar battery charging circuit is just to connect the positive wire from a solar panel to the positive battery terminal, and the negative solar panel wire to the negative battery terminal.
This will quite happily charge a battery! However, there are two potential problems with attaching a panel directly to a battery. The first is that, at night, electricity can leak back into the panel, which will slowly discharge the battery. In fact, the amount of leakage is usually small, and not worth worrying about - but if you do want to prevent it you can easily fit a diode (a sort of one-way valve for electricity) in the line, as in this diagram.
The second problem is more serious - the solar panel, if left on it's own, can overcharge the battery. To avoid this you are better to use a charge controller, which has circuitry to stop power flowing from the solar panel to the battery when the battery is full.