according to Florida handsbook, you must dim your bright headlights within 300 feet of the vehicle ahead.
Within 15 feet
at least 2m
500 to 1000 ft.
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.
500 feet if the vehicle is coming to you, 300 feet if you are following it.
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.)
It is safe to use your bright headlights if there is a car ahead of you within 300 feet.
Those laws vary from place to place. Common courtesy dictates to dim your lights well before they reach the oncoming vehicle.
500 feet for oncoming traffic and 300 feet when following closely behind another vehicle. Source: Kansas Department of Revenue, Division of Vehicles
500 feet is what I was taught but different areas have different rules. You may have to check with the DMV or the PD about this.