There is an argument that humanity, as a species, could not have risen so far without religion. The reason being that it is our initial tendancy to look at things and make patterns out of them which gives us both religion and science. Without that tendancy we have neither. Religion could be argued to be the initial attempts by humanity to explain how the universe works (a pattern is noticed and cannot be explained it is therefore attributed to cosmic forces and eventually attirbuted to a god). As the ability to observe and rationalise improves with time (and the ability to record information in books, something which was driven ironically enough by religion, and later other media helps with this because it means that each successive generation can call on the knowledge of all previous generations) we learn to apply a rational explanation to a greater range of phenomena and therefore remove the need for a mystical explanation.
Its sort of the backwards interpolation of Clark's law - sufficiently advanced technology is indistinguishable from magic. For primative man, everything was a mystery - the stars, gravity, fire, climate, weather - and so everything needed to be explained by a god. As we learnt more, as we ate the apple of the tree of knowledge and so lost our innocent naivity, we learn that there are more and more things that god is not a part of.