Flagstaff, in 1958, was the first municipality to adopt a lighting ordinance aimed at preserving dark skies. Tucson and Pima County adopted a comprehensive ordinance in 1972 and have updated it many times since. Currently, Arizona and most of its counties have lighting ordinances.
The International Dark-Sky Association lists 19 states and four European countries on its list of Dark Sky laws.
More information is at darksky.org