Specific state laws may differ slightly but in general a driver needs to use their headlights between sunset and sunrise, anytime visibility is impaired due to weather (rain, fog, smoke, blowing dust, etc) or road conditions call for it. Usually anytime you have to use the wipers, you should turn on your lights.
Some states say that headlights only need to be on from sunset, which is about an hour before full darkness, to sunrise so that vehicles are more visible during dusk and dawn. Other states require that you use your headlights before sunset and leave them on until after sunrise.
For a couple of examples of state laws see the information below.
Florida Statute 316.217 is titled when lighted lamps are required. Here it states:
(1) Every vehicle operated upon a highway within this state shall display lighted lamps and illuminating devices as herein respectively required for different classes of vehicles, subject to exceptions with respect to parked vehicles, under the following conditions;
(a) At any time from sunset to sunrise including the twilight hours. Twilight hours shall mean the time between sunset and full night or between full night and sunrise.
(b) During any rain, smoke, or fog.
(c) Stop lights, turn signals, and other signaling devices shall be lighted as prescribed for use of such devices.
Subsection (5) goes on to say that a violation of this section is a noncriminal traffic infraction, punishable as a moving violation.
In California the state laws require that you must use your headlights 30 minutes after sunset and leave them on until 30 minutes before sunrise. Other things the CA DMV notes about headlights are:
You must dim your lights to low beams within 500 feet of a vehicle coming toward you or within 300 feet of a vehicle you are following; and
You must turn on your headlights if snow, rain, fog, or low-visibility (1000 feet or less) require the use of windshield wipers.
The CA driver handbook goes on to say that you should use your headlights in the following situations:
- When it is cloudy, raining, snowing, or foggy. If weather conditions require you to use your windshield wipers, you must turn on your headlights.
- On frosty mornings when other drivers’ windows may be icy or "fogged."
- Any time you have trouble seeing other cars. Other drivers will be having trouble seeing you, too.
- On small country or mountain roads, even on sunny days. This helps other drivers see you and may help you avoid a head-on crash.
- When necessary to get another driver’s attention.
And the New York driver's manual states NYS law requires you to use your headlights from one-half hour after sunset to one-half hour before sunrise, when visibility is less than 1,000 feet (300 m) and whenever you are using your windshield wipers to clear rain, snow, sleet, etc.
The NY DMV advises that you turn your headlights on at dawn and dusk and in fog, too. Even when headlights do not help you see in low light periods, they make it much easier for other drivers and pedestrians to see your vehicle. Do not use parking lights or daytime running lights as a substitute, headlights do a better job. If an approaching driver flashes headlights at you during a period of low visibility, it probably means your vehicle was hard to see, and you should turn on your headlights.
This driver's handbook goes on to note that you need to be considerate in using your high beams. Your headlights must be on low beam when you are within 500 feet of an approaching vehicle, or within 200 feet of a vehicle ahead of you, even if the vehicle ahead is in a different lane. You should also dim your lights for pedestrians approaching you.
If an approaching driver does not dim his or her lights, flash yours to high beam for a second, then back to low beam. To help avoid the glare of approaching high beams, shift your eyes to the right. Use the road edge as a guide until the approaching vehicle passes by.
To see what your particular state's laws are concerning the use of headlights and the time of days as well as conditions that require you as a driver to turn on your lights contact your state's Department of Motor Vehicles.