Melanin is a pigment found in your skin and hair cells that gives each its color. It does seem weird that the sun bleaches our hair and darkens our skin. This mostly has to do with hair being dead and skin being alive. The sun bleaches and destroys the melanin in your hair giving you lighter hair.