Unless you're on totally flat land, you turn your lights on BEFORE sunset ... about half an hour ... because even when the sun is still up it's getting dark and harder to see the other cars.
Most states require you to turn on your headlights a half an hour (30 minutes) BEFORE sunset. (That is based on my experience, driving mostly in the Northeast.)
A masthead light, side lights and a stern light are the lights that power driven vessels less than 65.6 feet long and underway between sunset and sunrise exhibit.
as long as the person driving is sober
Chanukah lights need to burn for at least 1/2 hour after sunset. So, you can light earlier (e.g. on Friday when you need to light before Shabbat) as long as they are big enough candles or sufficient oil to remain lit for 30 minutes after sunset.
Power-driven vessels less than 65.6 feet long must exhibit a white masthead light and a white stern light between sunset and sunrise when underway. Additionally, they should also display red and green sidelights when the visibility is restricted.
as long as the person driving is sober
90 minutes
As long as it does not obscure your lights or license plate you can drive with your tailgate down.
Port and starboard steaming lights and stern light
Where I live it is 30 minutes before sunset and 30 minutes before sunrise that you are supposed to have your headlights turned on.
Yellow lights should generally be 1 second long for every 10 mph of the speed limit. Yellow lights should generally be 1 second long for every 10 mph of the speed limit.
red and green sidelights