The correct option is "by, by". This is because the phrase "by day" and "by night" is a common expression used to refer to something occurring during the day and night, respectively.
- By day refers to during the day.
- By night refers to during the night.
Thus, the correct sentence is: "The sun shines by day and the moon by night."