It's all psychological. It's a fear of the unknown, the fear of things that you cannot see, be they benevolent or not. It's true that we no longer have to fear Predators attacking us, but if you look at the human species, we've been around for a VERY short time, cosmically speaking, and we've been sentient for an even shorter time, and so we're still just coming out of our primal selves. Therefore, we still have many instinctual habits, those animal instincts are still there. Our instincts don't like the dark because it thinks there might be a predator in there waiting to eat us, especially because the dark is associated with nighttime, and many predators were nocturnal. Our instincts still think there are dangerous living things all around, and is still trying to help us survive, even though we don't really need it when we're older. It's like a little person sitting on our shoulder and saying "Hey! Watch out! There could be something in there!"
And that is my psychological and extremely nerdy analysis on the fear of darkness.