A solar charge controller regulates the voltage power from the solar panel(s) to the battery. Without a solar charge controller a battery may be overcharged, when a battery overcharges it creates heat that may damage and reduce the battery life.
Solar Charge Controller + Battery = Best Battery Health and Longer Life
Solar panels are made to produce more voltage than the system they are intended for. A typical panel for a 12 volt battery system will be rated at 15 to 19 volts output. A battery, when charging, will take an input voltage of 13 to 14.4 volts and when fully charged registers just above 12 volts.
A solar charge controller will change the voltage to the battery depending on what is needed. The solar charge controller uses signals from both the solar panels and the battery or batteries to determine this - it can do this several times a second.
We generally like to see PWM (Pulse Width Modulation) and MPPT (Maximum Power Point Tracking) in solar charge controllers as they will do the best job for battery health and use the energy from the panels more efficiently.