by night is typically used to contrast someone's nighttime activities to their daytime activities, especially when the nighttime activities are unusual or unexpected. You will see it very frequently in the construction
X by day, Y by night. Some examples:
- ...treated it like a greasy spoon by day and a hotel by night
- I mean, if it's -- if it's somebody that is -- is living as a man that's a woman or living as a woman that's a man or someone that's a prostitute by night and a -- and a secretary or a lawyer by day.
- He's a DJ by night, a graphic artist by day. He's multifaceted.
- ...he dwelled, chief of all worldly American expats, hanging out with bullfighters, jai alai players, and ex-Spanish Loyalist guerrillas, awash in drink and worldly women, fishing by day, partying by night, writing the whole time.
On the other hand,
at night is much less constrained as to the interpretation. The preferred thing to say will be that the
sky glitters at night, since this is the expected activity for a sky. To say that an animal
hunts by night uses the
by night expression because we normally think of day time as the time where animals should be most active, based on our own experience.
Another useful note is that
by night can almost always be replaced by
at night without altering the acceptability of the sentence, but not vice versa.