Chickens struggle to see in the dark. They don’t have night vision, unlike many other animals. Chickens have fewer light-sensitive receptors than other animals, meaning they are basically blind at night.
This is why chickens must return to a coop before nightfall, and it must be proven against predators. If you have chickens, you may need to train them to return to the coop.