Our skin and hair has a brownish-black pigment in it called melanin, which gives them the certain color. Our skin is a living tissue. When we are exposed to the sun the rays, the ultraviolet rays cause the skin to produce more of melanin, which helps to lessen the damage caused by radiation. Production of more melanin darkens our skin and protects it against furthern UV radiation. The lighter our skin, more likely that our skin burns because our skin can not produce sufficant amount of melanin.
Our hair on the other hand is dead and can not continue to reproduce anything. So when exposed to radiation by the sun, the hair gets bleached. It starts to fade color since no new melanin is produced to protect the hair. The root of hair produces melanin which will give color to only the new hair growing, but not the faded hair.