Professor: OK, so as an example, let’s look at earthworms. As their name suggests of course, earthworms spend most their time living underground. And this underground environment is dark and moist which is perfect for earthworms. They need to keep their skin moist because they absorb oxygen from the surrounding soil through the surface of their skin. They actually breathe through their skin. So, if an earthworm ended up above the ground, exposed to the sunlight, it would need to escape, get out of the sunlight. Since the rays of the sun would eventually cause its skin to dry out. And with dry skin, the worm wouldn’t be able to breathe, they would die.
But the thing is earthworms don’t have eyes, they are unable to see things the way many other animals can, but when they're digging tunnels through the earth, they know, if they accidentally dug tunnel to the surface. Because they have special cells on the outside of the bodies that are sensitive to sunlight. So, if a worm digs a tunnel that leads toward the open air and sunlight, these cells detect the light and the worm reacts by turning around and going the other way, tunneling deeper underground until its cells no longer detect sunlight. This way the worm manages to stay underground where, its skin can stay moist.