Can the US flag be displayed at night?

Yes it can as long as it is illuminated. Contrary to most beliefs, the flag can even be displayed in the rain or other inclement weather as long as the flag is made of a weatherproof material. These and other rules are set forth in Title 4 United States Code Chapter 1 to 5.