In 1830 a young French aristocrat visited the United States to see the new phenomenon of American democracy built on the principled separation of Church and state. He naturally expected to find a secular society, a place where religion, having been deprived of power, had no influence either. What he found was exactly the opposite: a society that was very religious indeed, a society in which religion was, in his words, "the first of its political institutions" — or, as we would say today, the first of its civil institutions.

The young aristocrat was Alexis de Tocqueville, and in the book that he wrote about his experiences, namely his experience of American democracy, he said: "18th-century philosophers had a very simple explanation for the gradual weakening of beliefs: religious zeal was bound to die down as enlightenment and freedom spread." In other words, Tocqueville was saying that every self-respecting 18th-century intellectual thought that religion was dying, in intensive care, and all that was needed was a little bit of help on its way — assisted suicide. "It is tiresome," Tocqueville said, "that the facts do not fit this theory at all." So he had this question: how come religion didn't die when everyone said it would?

One hundred and eighty years have passed since Tocqueville wrote these words, but until very recently intellectuals have been making the same mistake. In America today, for example, a higher percentage of the population attends a house of worship weekly than is the case in the theocratic state of Iran: 40 per cent in the US, 39 per cent in Iran. Furthermore, in China today, half a century after Chairman Mao declared China to be religion-free, there are more practising Christians than there are members of the Communist Party. One way or another, religion didn't die.

In 2009, the editor and the Washington correspondent of the Economist, John Micklethwait and Adrian Wooldridge, published a book, God is Back — an extraordinary title to come from the staff of that magazine. In 2000 the Harvard sociologist Robert Putnam published a book called Bowling Alone, in which he developed his famous thesis that more Americans than ever are going ten-pin bowling but fewer than ever are joining ten-pin bowling clubs or leagues. In other words, they're bowling alone. Putnam used this as his symbol for the loss of community in America, the loss of what American economists and sociologists call "social capital". So in 2000 he was arguing that there's no social capital left in America.

Ten years later, he published a book called American Grace, in which he documents his discovery that social capital is alive and well in America, in one place more than any other: in houses of worship. From four years of research, Putnam discovered that if you are a regular church or synagogue attendee, you are more likely to give money to charity than if you're not a regular, regardless of whether the charity is religious or secular. You are also more likely to do voluntary work for a charity, give money to a homeless person, give excess change back to a shop assistant, donate blood, help a neighbour with their shopping, help someone with their housework, spend time with someone who is depressed, allow another driver to cut in front of you, offer a seat to a stranger or help someone find a job. There is no good deed among all of those on the survey that is more practised by secular Americans than by their religious counterparts.

It goes further than this: frequent worshippers are also more active citizens — they are more likely to belong to community organisations, especially those concerned with young people, or health or arts or leisure. They are more likely to join neighbourhood or civic groups, professional and fraternal associations. Within these groups they are more likely to be officers or committee members. They take a more active part in local civic life, from local elections to town meetings to demonstrations. They are disproportionately represented among local activists for social and political reform. They turn up, they get involved, they lead. And the margin of difference between them and secular Americans is large.

Religiosity turns out to be the best indicator of civic involvement: it's more accurate than education, age, income, gender or race. Incidentally, religious regular synagogue or church goers are more likely to report themselves as being happier and they also live longer. Putnam's book demonstrates that not only has religion not died, but that it is a fundamental and primary source of community and altruism. Furthermore, Putnam says that research in Britain — which is not yet published — confirms the same thing.

More recently, the Scottish historian Niall Ferguson says something remarkable towards the end of his book Civilisation: The West and the Rest. He recounts how the Chinese Academy of Social Sciences was tasked with the question of finding out how the West overtook China. Until about 1500, China was in advance of the West in virtually every aspect of technology: printing, ceramics, weaving, water-mills, and so on. But in the 1500s the West overtook China and stayed in advance of China until recently. So the Chinese Academy of Social Sciences was told to find out what it was about the West that gave it its unique advantage, and the Chinese scholars undertaking this investigation reported as follows:

At first we thought it was your guns, you had better and bigger guns than we had. Then we did some more study and we discovered no, it was your political system, it was democracy that gave you the better guns. Then we did a bit more research and we realised that it was your market, your economic system that gave you democracy that gave you the better guns. Except for the last 20 years we have realised it was your religion.

That was the discovery of the Chinese Academy of Social Sciences. I wrote a rather mischievous article about this for The Times, saying that today you may discover if you are a Western consumer of Christianity that your product has a "Made in China" label on it, but it's still worth buying anyway.

So there it is: the evidence that intellectuals have systematically misunderstood the nature of religion and religious observance and have constantly been thinking, for the better part of three centuries, that religion was about to disappear, yet it hasn't. In certain parts of the world it is growing. The 21st century is likely to be a more religious century than the 20th. It is interesting that religion is particularly growing in places like China where the economy is growing.

We must ask ourselves why this is, because it is actually very odd indeed. Think about it: every function that was once performed by religion can now be done by something else. In other words, if you want to explain the world, you don't need Genesis; you have science. If you want to control the world, you don't need prayer; you have technology. If you want to prosper, you don't necessarily seek God's blessing; you have the global economy. You want to control power, you no longer need prophets; you have liberal democracy and elections.

If you're ill, you don't need a priest; you can go to a doctor. If you feel guilty, you don't have to confess; you can go to a psychotherapist instead. If you're depressed, you don't need faith; you can take a pill. If you still need salvation, you can go to today's cathedrals, the shopping centres of Britain — or as one American writer calls them, weapons of mass consumption. Religion seems superfluous, redundant, de trop. Why then does it survive?

My answer is simple. Religion survives because it answers three questions that every reflective person must ask. Who am I? Why am I here? How then shall I live? We will always ask those three questions because homo sapiens is the meaning-seeking animal, and religion has always been our greatest heritage of meaning. You can take science, technology, the liberal democratic state and the market economy as four institutions that characterise modernity, but none of these four will give you an answer to those questions that humans ask.

Science will explain how but not why. It talks about what is, not what ought to be. Science is descriptive, not prescriptive; it can tell us about causes but it cannot tell us about purposes. Indeed, science disavows purposes. Second, technology: technology gives us power, but it does not and cannot tell us how to use that power. Thanks to technology, we can instantly communicate across the world, but it still doesn't help us know what to say. As for the liberal democratic state, it gives us the maximum freedom to live as we choose, but the minimum direction as to how we should choose. The market gives us choices but it does not tell us what constitutes the wise or the good or the beautiful choices. Therefore, as long as we ask those questions, we will always find ourselves turning to religion.

Religion isn't the only source of answers; there are other spheres that offer them, such as literature. But religion remains the main repertoire of those meaning-based questions. The fundamental argument that I make in my book The Great Partnership, subtitled "God, Science and the Search for Meaning", is that science and religion are extreme cases of two different ways of thinking about the world. I use a metaphor to explain this, and I don't mean anything more than a metaphor because precise neuroscience it isn't — the brain is very complex and plastic — but I've said that science is the paradigm of left-brain thinking: it is atomistic, it is analytical, whereas religion is synthetic and integrative, a characteristic right-brain way of thinking. To summarise 120,000 words in a single sentence: "Science takes things apart to see how they work; religion puts things together to see what they mean."

Those are two irreducibly different ways of thinking, and in the book I give lots of examples of other situations where we have two completely different ways of thinking. I look at the educational psychologist Jerome Bruner, who writes about the difference between systems and stories. Or the Harvard neuroscientist Carol Gilligan who writes about the different ways that men and women think about morality. Men tend to think in atomistic terms — what are my duties?-whereas women tend to think in relational terms: how do the various characters involved relate to one another?

Simon Baron Cohen, the Cambridge psychologist, has written a very interesting book called The Essential Difference, on autism and the gender differences between the ways we relate to each other. I also give examples from Richard Nisbett on East/West perceptions — the different ways that the Chinese, or in general people from the East, will describe a scene from the way that Americans will. Americans are very atomistic, they're very left brain. The Chinese are very relational. Here is one simple example from the reading primer that children get in school. The American reading primer says: "See Dick run," "see Dick play," "see Dick run and play." The Chinese equivalent says: "Big brother takes care of little brother," "big brother loves little brother," "little brother loves big brother": it's all about relationships.

These are fundamentally different ways of thinking, and religion and science are similarly different. The result is that, for a balanced personality, we have to have meaning dimensions and we have to have analytical explanatory dimensions, and they're different. Trouble arises because not everyone realises the need to see with two eyes, with two hemispheres, to hear in stereo.

Denying this leads to two possible fallacies. The first is that religion is the only source of ultimate truth and religion can tell us that science is just wrong. The second is that science is the only ultimate truth and therefore science can tell us that religion is wrong. These are both fallacious ways of thinking.

Religion is not the only source but it is a key source of meaning. The result is that many scientists commit the fallacy of arguing that since science is the only way of understanding the universe, and since science does not yield meaning, it follows as a scientific fact that life has no meaning.

So you get Jacques Monod, for instance, saying, "Man must at last wake out of his millenary dream and discover his total solitude, his fundamental isolation. He must realise that like a gypsy he lives on the boundary of an alien world, a world that is deaf to his music and as indifferent to his hopes as it is to his sufferings or his crimes." Or Steve Weinberg, the Nobel Prize-winning physicist, who says the more the universe seems comprehensible, the more it seems pointless. Now those are not scientific propositions. They are what happens if you are tone-deaf to meaning. In Judaism we can live with that, but in Judaism it is a mood not a truth. Here's something in Judaism that sounds like Steve Weinberg or Jacques Monod:

Meaningless, meaningless, says the teacher, utterly meaningless, everything is meaningless. Man's fate is the same as the animal's, the same fate awaits them both: as one dies so does the other, all have the same breath, man has no advantage over the animal. Everything is meaningless. (Ecclesiastes 1.)

But we have enough of a sense of humour in Judaism to say: "You're going to get out of this bad mood." We can accept it as a mood, but it's not a truth. And of course sometimes atheists — and I mean great atheists, really great atheists — can sound incredibly eloquent. The most eloquent piece of atheism I have ever read is by Bertrand Russell, who really was a stylish atheist, a serious atheist, and a thinker I like very much. Here is Bertrand Russell on a bad day:

That man is the product of causes, which had no provision of the end they were achieving. That his origin, his growth, his hopes, his fears, his loves and his beliefs are but the outcome of accidental collocations of atoms. That no fire, no heroism, no intensity of thought and feeling can preserve an individual life beyond the grave. That all the labours of the ages, all the devotion, all the inspiration, all the noon-day brightness of human genius is destined to extinction in the vast death of the solar system and that the whole temple of man's achievement must inevitably be buried beneath the debris of a Universe in ruins. All these things if not quite beyond dispute are yet so nearly certain that no philosophy that rejects them can hope to stand. Only within the scaffolding of these truths, only on the firm foundation of unyielding despair can the soul's salvation henceforth be safely built.

Isn't that magnificent? But it's possible to rewrite that passage from the opposite point of view, from a completely theistic perspective, and to say virtually the same thing. Here is my attempt at Bertrand Russell:

That man, despite being the product of seemingly blind causes, is not blind, that being in the image of God he is more than an accidental collocation of atoms, that being free he can rise above his fears and with the help of God create oases of justice and compassion in the wilderness of space and time. That though his life is short he can achieve immortality through his fire and his heroism, his intensity of thought and feeling. That humanity too, though it may one day cease to be, can create before that night falls a noon-day brightness of the human spirit. Trusting in that though none of our kind will be here to remember yet in the mind of God none of our achievements is forgotten. All of these things, if not beyond dispute have proven themselves time and again in history; we are made great by our faith, small by our lack of it. Only within the scaffoldings of these truths, only on the firm foundation of unyielding hope, can the soul's salvation be safely built.

I never understood why it should be considered more courageous to despair than to hope. It takes courage to hope; it doesn't take courage to despair. Freud said that religious faith is the illusion — the comforting illusion — that there is a father figure. But a religious believer could say to Freud that atheism is the comforting illusion that there is no father figure and you can get away with whatever you feel like doing. So I don't know why atheism is somehow considered more heroic than theism; I call that an adolescent dream.

Nevertheless, I have tried in my book to quote only atheists and agnostics in my defence. My arguments are based on atheists like Nietzsche, agnostics like Wittgenstein and so on. And at the very beginning of the book I quote three thinkers whom we do not normally think of as religious people: Einstein, Freud and Wittgenstein, all of whom nevertheless say that the meaning of life is identical to the question of religion. Here are the direct quotes:

Albert Einstein: "To know and to answer the question, ‘What is the meaning of human life?' is to be religious."

Freud: "The idea of life having a purpose stands and falls with the religious system."

Wittgenstein: "To believe in God is to see that life has a meaning."

Then I quote Tom Stoppard, who said, "When we have found all the mysteries and lost all the meaning we will be alone on an empty shore." I do not think we are alone because we have not lost the meaning.

It works the other way, too: if faith can respect science, so science can respect faith. Richard Dawkins says the following: "I think a case can be made that faith, the principled vice of any religion, is one of the world's great evils, comparable to the smallpox virus, but harder to eradicate. Faith is a great cop-out." However, Max Planck, the Noble Prize-winning physicist and founder of quantum theory, says, "Anyone who has seriously engaged in scientific work of any kind realises that over the entrance to the gates of the temple of science are written the words, ‘Ye must have faith'." It is a quality with which the scientist cannot dispense.

Einstein says something similar: "But science can only be created by those who are thoroughly imbued with the aspiration towards truth and understanding. This source of feeling, however, springs from the sphere of religion, to this there also belongs the faith in the possibility that the regulations, valid for the world of existence, are rational — that is, comprehensible to reason. I cannot conceive of a genuine scientist without that profound faith." He went on to make the famous utterance: "The situation may be expressed by an image: science without religion is lame, religion without science is blind."

Finally, there is the world's most profound atheist, Nietzsche: "It is still a metaphysical faith upon which our faith in science rests. That even we seekers after knowledge today, we godless anti-metaphysicians still take our fire too from the flame lit by a faith that is thousands of years old." So Nietzsche says, if we didn't have faith, why should we even regard truth as a value? If you're a politician you don't always want truth, you want power. Why should truth be a value, if not for the fact that we have religious faith? That is Nietzsche's point.

I think we need both. We need religion and we need science. We need science to explain the universe and we need religion to explain the meaning of human existence. We stand to lose a great deal if we lose religious faith. We will lose our Western sense of human dignity. I think we will lose our Western sense of a free society. I think we will lose our understanding of moral responsibility. I think we will lose the concept of a sacred relationship, particularly that of marriage, and we will lose our concept of a meaningful life. I think that religious belief is fundamental to Western civilisation and we will lose the very heart of it if we lose our faith.

What I do not say is that it is impossible to be a thoroughgoing, insistent atheist. To the contrary, my doctoral supervisor, the late Sir Bernard Williams, one of the greatest philosophers of his age, was a thoroughgoing atheist, a categorical atheist, and I had enormous respect for him. However, his vision was ultimately a tragic one. He really believed that life had no meaning. I think he helped us understand what would happen to Europe if it were to lose its religious faith. In his finest book Shame and Necessity, he put forward the view that Europe today — Western civilisation today — is in the same basic state as the pre-Socratic Greeks. And he may well be right.

Last year Ferdinand Mount wrote an interesting book called Full Circle, in which he suggests that we are back in the situation of third-century BCE Greece. That makes a lot of sense to me; much of what we are hearing from philosophers and scientists today is very similar to the position of the Stoics, the Sceptics, the Cynics and the Epicureans. But that is not a happy place to be, because although people in third-century BCE Greece didn't know it — it's hard to know you're living in BC anything — they were going to be followed by second-century BCE Greece, which experienced decline, after which Greece did not survive as a living society for very long. A century later it had more or less suffered a complete political eclipse.

If today can be seen as equivalent to third-century BCE Greece then our society is currently in decline, and I fear that this will happen if we lose our faith. Nevertheless, I have tried in The Great Partnership to find common ground with atheists, serious atheists, with Nietzsche and with others.

There is a passage that seems to me highly relevant to our current situation. Will Durant, an American historian writing between the 1930s and the 1960s, published an 11-volume work entitled The Story of Civilisation. In his younger days Durant wanted to be a priest, but he lost his faith and became instead one of the world's greatest students of the history of civilisation. In Volume V he says something that I believe strikes a chord with where we are today:

A certain tension between religion and society marks the higher stages of every civilisation; at its height it gives people that unity of morals and belief that seem so favourable to statesmanship and art. Religion ends by fighting suicidally in the lost cause of the past. For as knowledge goes or alters continually, it clashes with mythology and theology which change with geological leisureliness. In other words science moves faster than rabbis and priests do, does that makes sense? They just travel faster so we can't keep up. Priestly control of arts and letters is then felt as a galling shackle or hateful barrier and intellectual history takes on the character of a conflict between science and religion. Institutions that were first in the hands of the clergy, like law and punishment, education and morals, marriage and divorce tend to escape from ecclesiastical control and become secular, perhaps profane. The intellectual classes abandon the ancient theology, and after some hesitation the moral code allied with it. Literature and philosophy become anti-clerical. The movement of liberation rises to an exuberant worship of reason, and falls to a paralysing disillusionment with every dogma and every idea. Conduct, deprived of its religious supports, deteriorates into epicurean chaos. And life itself, shorn of consoling faith, becomes a burden alike to conscious poverty and weary wealth. In the end, a society and its religion tend to fall together like body and soul in a harmonious death.

This was written in the early 1950s, but anyone who has ever studied the history of civilisations, whether it be the 14th-century Islamic historian Ibn Khaldun or the 18th-century philosopher Giambattista Vico, or even atheists like John Stuart Mill or Bertrand Russell, has come to this conclusion: individuals may live good lives without religion — the moral sense is part of what makes us human — but a society never can, and morality is quintessentially a social phenomenon. It is that set of principles, practices and ideals that bind us together in a collective enterprise. The market and the state may be driven by the pursuit of interests but societies are framed by something larger and more expansive, by a shared vision of the common good. Absent this and societies begin to fragment. People start thinking of morality as a matter of personal choice. The sense of being bound together — the root meaning of "religion" — in a larger enterprise starts to atrophy and social cohesion is lost. The West was made by what is nowadays called the Judeo-Christian heritage which gave it its unique configuration of values and virtues. Lose that and we will lose Western civilisation as we have known it for the better part of two millennia.

Does Judaism have anything specific to add to this? One important insight is that almost from the beginning the rabbis sensed that science is one thing and religion another, and they do not clash. They are just different things. This is beautifully epitomised in the blessing that rabbis coined 2,000 years ago on seeing a great non-Jewish scientist: "Blessed is God...who gave of His wisdom to flesh and blood."

Which scientists were the rabbis thinking about? They were Greeks or Romans. From the rabbis' point of view they were pagans who opposed everything that Judaism stood for. Yet the rabbis themselves coined this blessing thanking God for such scientists, saying, in effect, "We think differently from you, we have fought battles with you, but nonetheless we respect your scientific prowess and so we make a blessing thanking God for you." To recognise the independent integrity and religious dignity of science is an important thing for a religion to do.

Jews too are used to arguments. All the canonical texts of Judaism are anthologies of arguments. Therefore, if we are confident in our faith, we have nothing to fear from the findings of science and the challenges of atheism. In 2010 I made a television programme in which I had a series of conversations with four non-believers, three of whom were Jews: Howard Jacobson, Alain de Botton and Lisa Jardine, (the fourth was Oxford neuroscientist Professor Colin Blakemore). There was something enlarging about those encounters: honest, open, serious and civil.

Likewise I cherished my friendship with the late Sir Isaiah Berlin, a secular Jew. The first time he came to our house he said, "Chief Rabbi, whatever you do, don't talk to me about religion: when it comes to God, I'm tone deaf." Then he said, "What I don't understand is how you who studied philosophy at Cambridge and Oxford can believe." And I said, "Isaiah, if it helps, think of me as a lapsed heretic." And he said, "Quite understand, dear boy, quite understand."

In 1997 I published a book called The Politics of Hope, in which I argued that the world had moved on since Berlin's great 1957 lecture "Two Concepts of Liberty", and that the threat to liberty was now different: not totalitarianism but rather the internal moral decay of free societies. I asked him if he would be kind enough to take a look at the book, because I was keen to know his response. He told me to send him the book and he would let me know his thoughts. The months passed and I heard nothing, so I telephoned Headington House. Lady Berlin answered the phone and said, "Chief Rabbi, Isaiah's just been talking about you." Rabbis were not the usual subject of Isaiah Berlin's conversations, so I asked in what context he had mentioned me, and she said, "Isaiah has just asked you to officiate at his funeral." Clearly Isaiah knew. Four days later he died and I officiated at his funeral. His biographer, Michael Ignatieff, asked me why Isaiah, a secular Jew, wanted a religious funeral. I said — I hope I didn't get it wrong — that Isaiah may have been a secular Jew but he was a loyal Jew. So I felt a strong kinship with him, even though his religious views were different from mine.

This sense of kinship across intellectual divides is the Jewish equivalent of the lovely English idea of "dining with the opposition" — the ability to sustain personal friendships even when our views are opposed. That human bond is lost when scientists and religious leaders hurl abuse at one another, vilifying and misrepresenting each other's views. That cannot be good for religion or for science or for the future of the humanity we share.

So I return finally to where I began, with Robert Putnam. Putnam argued in his book American Grace, that what makes the difference to people, turning them into good citizens and good neighbours, is belonging to a community, rather than what people believe. He wrote that an atheist who goes regularly to synagogue or to church is likely to be a better human being than a religious believer who never joins a community.

In a surprising way the rabbis suggested something similar. A famous rabbinic text has God saying, "Would that they disbelieved in Me but studied My Torah. For if they study My Torah, its light will bring them back to Me." That is a very radical statement, and it is a basis on which believer and non-believer can join hands in friendship. The sociologist of religion Grace Davie said about English Christianity that it consists of believing without belonging. The Jewish community tends to be the opposite: belonging without necessarily believing. We now know, courtesy of Robert Putnam, that it is the belonging that makes the difference.

I once defined faith as the redemption of solitude. It sanctifies relationships, builds communities, and turns our gaze outward from self to other, giving emotional resonance to altruism and energising the better angels of our nature. These are some of the gifts of our encounter with transcendence, and whether it is love of humanity that leads to the love of God or the other way round, it remains the necessary gravitational force that keeps us, each, from spinning off into independent orbits, binding us instead into the myriad forms of collective beatitude. A society without faith is like one without art, music, beauty or grace, and no society without faith can endure for long.

Read the entire article on the Standpoint website (new window will open).