Dark pigmentation in hair is caused by melanin, the same substance the body uses for tanning the skin. A child's fair hair darkens over time as more melanin is produced and incorporated into the hair core. Melanin is produced mainly in response to sunlight, so as the child sees more sun, its hair will tend to darken. Too much sun will, of course, bleach it again.