Those laws vary from place to place. Common courtesy dictates to dim your lights well before they reach the oncoming vehicle.
according to Florida handsbook, you must dim your bright headlights within 300 feet of the vehicle ahead.
at least 2m
500 to 1000 ft.
Be considerate in using your high beams. Your headlights must be on low beam when you are within 500 feet (150 m) of an approaching vehicle, or within 200 feet (60 m) 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. http://www.nydmv.state.ny.us/dmanual/chapter10-manual.htm (Alaska and Oregon are the same as New York - 500 feet.)
1,000
500'
the courteous time to dim your headlights is as soon as you see another vehicle, or within one half mile.
If you are a courteous driver, you will dim them when you see their tail lights. No one likes bright lights in their mirrors, reflecting into their eyes.
At night a driver should dim his headlights when an oncoming motor vehicle comes within 1,000 feet. You should switch your headlights from full beam to dipped beam when a oncoming car passes. It is unsafe to leave your headlights on full beam as it blinds the driver of the oncoming car.
At night a driver should dim his headlights when an oncoming motor vehicle comes within 1,000 feet. You should switch your headlights from full beam to dipped beam when a oncoming car passes. It is unsafe to leave your headlights on full beam as it blinds the driver of the oncoming car.
Railroad tracks, tunnels, or intersections.
500 feet if the vehicle is coming to you, 300 feet if you are following it.