I think it is an evolutionary response from the days where humans were out in the wild. In the dark, you cannot see the dangers around you, and so you cannot defend yourself as well from threats. This leads to the dark being quite scary.
We humans want to know and understand everything around us, and somewhat when it's dark we can not see things around us, we can only feel it but can't understand and this somewhat gives us the feeling of fear.
We humans want to know and understand everything around us, and somewhat when it's dark we can not see things around us, we can only feel it but can't understand