The title of Dawkins's book, The God Delusion, draws from Freud's book The Future of a Illusion. So does atheist Christopher Hitchens in his new book God Is Not Great.
For Dawkins, Hitchens, and Sam Harris, Freud is an ally. "Illusion" is bad; science (= non-illusion) is good. Religion-as-illusion is the cause of much evil. But later in his life Freud, in Moses and Monotheism, has a different take on religion. Mark Edmundson of the University of Virginia points this out in his nytimes essay "Defender of the Faith?" and in his forthcoming book The Death of Sigmund Freud: The Legacy of His Last Days.
Edmundson writes: "In his last book, written when he was old and ill, suffering badly from cancer of the jaw, Freud offers another perspective on faith. He argues that Judaism helped free humanity from bondage to the immediate empirical world, opening up fresh possibilities for human thought and action. He also suggests that faith in God facilitated a turn toward the life within, helping to make a rich life of introspection possible."
Edmundson: "Judaism’s distinction as a faith, [Freud] says, comes from its commitment to belief in an invisible God, and from this commitment, many consequential things follow. Freud argues that taking God into the mind enriches the individual immeasurably. The ability to believe in an internal, invisible God vastly improves people’s capacity for abstraction. “The prohibition against making an image of God — the compulsion to worship a God whom one cannot see,” he says, meant that in Judaism “a sensory perception was given second place to what may be called an abstract idea — a triumph of intellectuality over sensuality.”"
Edmundson: "Freud’s argument suggests that belief in an unseen God may prepare the ground not only for science and literature and law but also for intense introspection. Someone who can contemplate an invisible God, Freud implies, is in a strong position to take seriously the invisible, but perhaps determining, dynamics of inner life. He is in a better position to know himself. To live well, the modern individual must learn to understand himself in all his singularity. He must be able to pause and consider his own character, his desires, his inhibitions and values, his inner contradictions. And Judaism, with its commitment to one unseen God, opens the way for doing so. It gives us the gift of inwardness."
While Freud remained an atheist, he came to see religion, especially Judaism, not as intrinsically heinous, but as helpful and productive and valuable. So, the later Freud is not in bed with Hitchens/Dawkins/Harris as regards their invectives against religion as intrinsically evil. This is important, because the heart of this trio's angry complaint is that, e.g., as Dawkins claims, to teach children religion is to engage in a form of child abuse. Freud, far more psychologically astute than Dawkins, argued against this.
A final thought from Edmundson re. Freud: "Schopenhauer, Nietzsche and Freud were all at times able to recognize religion as being what Harold Bloom has wisely called it: not the opium of the people but the poetry of the people. They read Scripture as though it were poetry, and they learned from it accordingly. They saw that even if someone does not believe in a transcendent God, religion can still be a source of inspiration and of practical wisdom about how to live in the world. To be sure, it often takes hard intellectual work to find that wisdom. (As the proverb has it, “He who would bring home the wealth of the Indies must carry the wealth of the Indies with him.”) Yet Freud’s late-life turn shows us that there is too much of enduring value in religion — even for nonbelievers — ever to think of abandoning it cold."