Ken’s probably the best one to answer the question given that he lives somewhere where there is lots of sun! But I would guess it is because the sun on skin stimulates the melanocytes (cells that make skin pigment) to produce more as a protective measure from the sun. But as hair is made from a protein but not living cells, the protein gets bleached by the powerful rays of the sun. If you leave a coloured t-shirt out in the sun for several days, it will lighten in probably the same way.
Melanin is responsible for the colour of your skin and your hair.
The sun bleaches and destroys the melanin in your hair giving you lighter hair. Since hair is made of dead cells full of a protein keratin, the hair will stay that color until new hair comes in because there are no live cells to make more melanin.
When sun shines on your skin, it destroys the melanin as well. But since your skin is alive, it can respond to the sun’s damage. Your skin cells make more melanin and your skin becomes darker.
Just a little bit more info- melanocytes are the cells in the skin that create the pigment or colour (melanin). I think melanocytes account for about 5% of all the cells in your skin. When UV hits them, this activates them to produce melanin which gets excreted from the cell. This melanin is the taken up by the surrounding skin cells (or keratinocytes) where the melanin can act to protect the DNA from getting mutated. Basically, tanning is the bodies attempt at preventing excessive sun damage that causes skin cancer.