Sunlight helps in the production of melanin pigment in our skin. Melanin is required for the protection of skin cells…