I have the white solar powered flag pole light "saucer" from Flag Pole Buddy. Works great.
Doing some "research," the code says it's customary to "properly illuminate" it at night, but there is no law or statute about it. Goes back to 1923 when the code was adopted and natural fiber flags wore out fairly quickly. No sense leaving them up at night in the weather if no one could see them. With the newer synthetic materials, wearing them out fast is not a problem.
So, if you leave it up at night and don't have it lit, the Flag Police won't pound on your door at zero-dark thirty to arrest you.