Humans have excellent daytime vision, but our eyes are also surprisingly efficient in the dark. This is because we have two types of light-sensitive cells in our eyes: rods and cones.
The cones are used in bright light (photopic light levels) during the day and in almost all illuminated rooms. Besides that the cones enable us to see colors.
The rods only work in very dark situations (scotopic light levels), such as during the night when the stars are out. In these situations, there is not enough light for the cones. However rods are much more sensitive to light than cones and therefor we can still distinguish shapes and contrast even in almost pitch darkness.
In the transition between light and almost pitch darkness, both the cones and the rods transmit information. These light levels are called the mesopic range (twilight).
Cones work best when the light is yellow-green. Rods are optimized when the light is green-blue. During the day when we use our cones, our vision is the best in yellow light (photopic curve) but our sensitivity shifts to green and blue light (scotopic curve) at night, when our rods are most active. Notice that the rods are much more sensitive to green-blue light than the cones are to green-yellow light.