Why do animals need light?

To create vitamin d as without it the bodies of humans and animals are unable to break down vitamin c without it