Most solar lights turn on and turn off automatically by sensing outdoor light using solar panel voltage. Solar streetlights are designed to work throughout the night. Many can stay lit for more than one night if the sun is not available for a couple of days.