Actually, not etiquette, but U.S. Law:
United States Code Title 4 Chapter 1 — The Flag
§6. Time and occasions for display
a.It is the universal custom to display the flag only from sunrise to sunset on buildings and on stationary flagstaffs in the open. However, when a patriotic effect is...