Moths and many other nocturnal animals see at night because their eyes are adapted to compensate for the lack of light. All eyes, whether nocturnal or not, depend on photoreceptors in the retina to detect light particles, known as photons. Photoreceptors then report information about these photons to other cells in the retina and brain. The brain sifts through that information and uses it to build up an image of the environment the eye perceives.
The brighter the light is, the more photons hit the eye. … Photons aren’t just less numerous in darkness, but they also hit the eye in a less reliable way. This means the information that photoreceptors collect will vary over time, as will the quality of the image. In darkness, trying to detect the sparse scattering of randomly arriving photons is too difficult for the eyes of most daytime animals. But for night creatures, it’s just a matter of adaptation.