Following on the Reformation and its move away from the cultural as well as institutional authority of the Catholic Church in almost all things, the Enlightenment gave us a new understanding of the world. Among other things, according to that understanding
- there are two basic substances, material and mind (which is conflated with such terms as "soul" and "spirit");
- reason is understood as ultimately having the method and structure of geometry; and
- persons are understood as individual ("indivisible," in other words, basic or atomic) thinking and willing entities.
Given the burgeoning discoveries and products of human understanding—the progress of science—from the mid-17th century on, the confidence of the thinkers of that time isn't surprising. Based on what they saw, many thought this new way of understanding things would make it possible to solve all questions and to bring peace to the world. The hope for a transcendent eschaton brought about by God from outside human history was rapidly replaced by the hubris of an immanent eschaton brought about by human will working within history.
As early as Spinoza (1632-1677), European thinkers had made it clear, at least implicitly and often explicitly, that for those sufficiently enlightened, there is no need for religion. This is not an add-on to Enlightenment suppositions. It is implicit in the view itself, a view from which religion is a matter of authoritarianism rather than free inquiry, and superstition rather than scientifically constructed knowledge. The recent flurry of books by public atheists rebuking religion as dogmatic superstition is only the most recent reincarnation of the view that has been implicit in our culture for about 350 years.
The Enlightenment supposition that religion is extraneous to human thriving has not only survived, it has become more and more explicit. The irony is that even religious people have tended to accept the assumptions about the world, reason, and persons that yield that view, even when they, at the same time, have rejected the Enlightenment's conclusion. We have accepted the Enlightenment understanding of the world and reason and the person, and we have struggled to find a place for religion in the result.
By the 20th century Nietzsche (1844-1900) had convinced most of us that the Enlightenment goal of answering every question is impossible. He argued forcefully against the possibility of any ultimate eschaton, religious or secular. (Relatively few know who Nietzsche is, but many accept his conclusion without knowing him.) So we gave up on that goal. The problem is that we didn't give up on the Enlightenment's understanding of the world and reason and the person, the very understanding that had given us the hope of a secular eschaton, the hope which Nietzsche rejected.
The Enlightenment's assumptions became more complicated. For instance, some accepted the division of the world into two substances, material and mental, and then rejected the second as something existing on its own. They reduced the world to material in the simplified way that material was understood when the mind / matter division was first made.
Most were willing to allow probability into the model of reason, though they retained the idea that reason is ultimately best understood in mathematical terms. And many have agreed with Freud (1856-1939) that persons are more complicated than the early, Cartesian view of them as thinking substances. They might disagree with Freud's characterization of whatever it is about persons that isn't explicit in consciousness or with his methods for dealing with our psychological problems, but they don't disagree that there is more to the person than that which is explicitly conscious.
Though the Enlightenment's assumptions became more complex, the same assumptions have remained at the heart of Western thought since about 1650: the world is made of essentially inert and billiard-ball like stuff, reason is essentially mathematical, and persons are essentially individual wills. This means that we find ourselves part of a culture that assumes structurally that the world is not the kind of place that religion deals with. That eventually, if not already, we will not need religion is a corollary of that structure.