When driving at night, slow down and:

By law, your vehicle’s headlights must be turned on from a half hour after sunset until a half hour before sunrise. You should use your high beams whenever there are no oncoming vehicles.
DMV Writen Test