That's a difficult question. It's on the same level as why are we here? The answer would most likely depend on ones belief structure. Being raised a Christian I know from that belief the first mortals, supposedly, lived in perfect happiness with no worries and no cares till they gained "knowledge" as the saying ignorance is bliss may come from but anyway they realized different things like well for one modesty and became for lack of a better word afraid or uncomfortable at showing their own nakedness which before hadn't bothered them. In this religion the animals which now try to eat us (lions, tiger, bears, oh my) didn't care about eating them and were peaceful but they were cast out of their paradise and the animals started I'm sure wanting to eat humans. I'm also sure that getting thrown out of paradise, having large ferocious animals want to eat you, being the only two people on a likely harsh planet, etc... filled them with fear and that emotion has trickled down into every human. Getting to a scientific type answer if humans didn't have fear, which is part of a survival instinct, we would all be dead. I mean if I didn't fear getting burned or pain in general I'd jump into a bonfire. Fear is part of a human or animals instincts and survival part of their brains as we fear pain, death, etc.., which keeps us alive. An example would be I'm not afraid of the dark I'm afraid of what might be in the dark with the intent or possibility of hurting or killing me.
Many humans I find fear things they do not understand or that is more powerful than them. As NimirRaj said, something lurking in the dark would be the predator, hunting. I am starting to get it now... but, is there any possible way one can control or even stop fear from taking over him/her?
Many people learn to face fears such as fear of heights, but fearing the unknown would be as it is unknown impossible to face. I would assume things such as meditation and learning to calm ones mind would help and fears such as fears of animals like snakes, which is a common fear, can be faced by touching them, being around them, and it could help learning why things happen such as learning why a snake bites. What I mean is understanding your fear, why you fear it, and of course what to do if your in a situation you fear could help. Theyre so many fears in the world it's impossible to know how to deal with them all and some are so strong they're considered psychological.
The military trains fear control by having recruits train through similar situations (it's hard to be scared of a situation you've already easily handled in the past) and by teaching proficiency (it's also hard to be scared of a situation you know all about).
I would therefore suggest looking into military training in the pursuit of fearlessness. Educational military publications are available cheap at military surplus stores and many of them are free on sites like scribd. There are also several documentaries on the subject and I personally suggest a Discovery Channel show called Making The Cut which is all about the training and testing for US special forces divisions (Army rangers, Marine recon, etc.). One of the most striking fear-based tests I've seen is an Army ranger test in which you must nonchalantly walk on a 2-by-4 plank around 50 feet in the air (over water for safety). You don't just need to walk the length of the plank, you very specifically must walk it like it's no big deal - the objective being to appear calm and unfazed in order to best inspire and lead your fellow soldiers.