Solar lighting controllers generally have 2 functions. They are charge controllers that manage charging your battery from a solar panel. In addition, they allow you to connect a DC load to the controller, generally a light. The controller will then use the solar panel to detect if the sun is up or down. It can then control the light to turn it on and off based on the settings.
Most lighting controllers can be configured to turn on at dusk and off at dawn, or on a few hours after dusk and before dawn, or just on for some hours after dusk. The granularity depends on the controller.
Read more +MidNite BRAT 30A PWM Solar Charge Controller
The 30A PWM BRAT by MidNite Solar has many advanced features such as low voltage disconnect, lighting control, and auto equalization.