When loading a battery during the day from a solar panel it can be partially discharging through the panel after nightfall. This solar panel power switch circuit replaces the diode and connects the panel to battery through a relay contact.
When the power supply voltage is too low the relay is not ON, so the battery is not connected to the solar panel.
When the voltage is high enough to engage the relay and the LDR receives enough light in order to open T1, the relay will switch and the battery will charge.
The relay remains ON even when the solar panel voltage starts to decrease. A connected and charged battery can not action the relay when the light intensity decreases because R2 will block T1. The brightness at which this occurs is set by P1.
Because the power consumption is determined primarily by the relay, it is important that the relay should be a miniature one, with high coil resistance but also be capable to switch up to 10 Amps.
Components list for solar panel to battery switch