The dark has always frightened mankind, but understanding this fear requires serious analysis of our evolutionary past. One of the primary explanations for our fear of the dark is the fear of being eaten by predators. Considering 60% of lion attacks in Tanzania between 1988 and 2009 were in a 4 hour window from 6-9:45 pm, it is no wonder this has been coded in our DNA. After generations, those who were scared of the dark survived the lion attacks in many situations.
Children who are aged 4 – 6 years old have the most fear of the dark and this only tapers off by age 9. As the DNA encoded with the children starts to have environmental feedback that there are no lions in modern darkness, the fear recedes. Still, up to 5% of adults remain fearful of the dark, which can have drastic consequences for their ability to sleep. Overall, fear of darkness is yet another evolutionary trait that may have saved our lives at one point, but is no longer always relevant.
Original source: Why Are We Afraid of the Dark?