What is the difference between "at night" and "by night"?
There isn't a huge difference between the two, in terms of this sentence. However, you can think of "by night" as during the course of the night, or night compared to during the day. "At night" is similar in meaning but can refer to a specific time at night, and not during the entire course of the night. Ex: Predators hunt by night. Ex: I don't like to go outside at night. Oftentimes, "by night" and "by day" will appear in the same sentence. This is to add contrast or emphasize the difference in activity between night and day. In this case, we can understand Charlie Brown as emphasizing that the activity of the shepherds during the night was different from their activity during the day. Ex: She is a lawyer by day, and bar singer by night. Ex: I'm a student by day, and rock band drummer by night.