These are hard times for those who question mainstream religion. We live in a world inflamed by the godly, from rabble-rousing Christian fundamentalists to Muslim fanatics. In the Sixties and Seventies, doubters may have run the show, but today the God squad rules, at least in America and the Middle East. Only the brave or foolhardy risk its wrath.

Hence the surprise at the appearance, in the same month, of books published by two very different but equally distinguished non-believing intellectuals, writers who do not so much paddle in these troubled waters as plunge into them. Both look at religion as if it were a small, unpleasant growth in a Petri dish: not an approach likely to win many Vatican medals. Not that they care.

'By asking for an accounting of the pros and cons of religion, I risk getting poked in the nose or worse,' admits Daniel Dennett, a philosopher. 'Yet I persist. Why? Because I believe it is very important to look carefully at the question: are people right that the best way to live a good life is through religion?'

Lewis Wolpert, a developmental biologist, is even more outspoken. 'I know of no good evidence for the existence of God,' he writes. 'I am an atheist reductionist materialist.' (Yes, but which kind, I wondered, recalling an old Glaswegian joke: a Protestant atheist reductionist materialist or a Catholic atheist reductionist materialist?)

Not that committed Jews, Muslims or Christians will have much truck with Dennett or Wolpert. Only believers can understand religion, they argue, a pre-emptive disqualification summed up by Emil Durkheim: 'He who does not bring to the study of religion a sort of religious sentiment cannot speak about it! He is like a blind man trying to talk about colour.'

This, as the authors point out, has the same merits as the argument that only women can do research on women or that the inhabitants of the developing world are the only ones qualified to study developing nations. It's nonsense, in other words, and deservedly gets short shrift from both.

So what have they got to say about religion? What new insights can Dennett, an American, and Wolpert, who is British, bring to the understanding of belief in God by looking at it as if from an evolutionary perspective? For Wolpert, the line is direct and simple. Religion is a byproduct of the mental changes our species went through as we changed from grunting apemen to reasoning, tool-making Homo sapiens. In particular, it has much to do with our urge to make causal connections, to seek explanations for puzzling occurrences.

'An inability to find causes for important events and situations leads to mental discomfort, even anxiety, so there is a strong tendency to make up a causal story,' he says. 'Ignorance about important cause is intolerable. Our ancestors needed to account for events rapidly even when they had little knowledge.'

Deities were, therefore, invoked to fill in gaps in our knowledge, to explain thunderstorms to a species that was evolving a deep need to understand the natural world. Belief can be seen as a form of mental protection against the intolerable reality of not knowing.

But why did religious ideas stick so persistently, in the face of more convincing explanations? That is a trickier issue. Here, Dennett has an answer, of sorts. He invokes the idea of memes, first outlined by Richard Dawkins 30 years ago. Memes are persistent, convincing ideas - think of them as mental viruses - that have the ability to evolve and pass from one individual to another, down through generations. 'It is not surprising religion survives,' says Dennett. 'It has been pruned and revised and edited for thousands of years, with millions of variants extinguished in the process, so it has plenty of features that appeal to people.'

Thus, God is no longer invoked to explain thunderstorms or comets appearing in the night sky but to explain our existence and the creation of the universe. It's an intriguing but not entirely convincing explanation, even for Wolpert. 'Just what a meme is and how it is distinguishable from beliefs, I find difficult,' he says.

Certainly, there has to be more to religion than evolutionary opportunism, for it palpably does not change to keep up with the times. Consider the Bible. This is really a lifestyle guide for surviving the vicissitudes of the Levant thousands of years ago. It condones slavery (Leviticus), exonerates murder for not observing the Sabbath (Exodus); and reviles those with eye defects (again Leviticus, not a book for the faint-hearted). Nevertheless, hundreds of millions of decent, law-abiding, not to mention short-sighted, people claim every word in it is true.

Both authors are careful to paper over such cracks in their arguments and have packed their books with a mass of intriguing detail and anecdote (Dennett is particularly strong on this latter point). Both are first-class writers, producing witty and clear prose. If I have favourite of the two, however, it is Wolpert's, largely because of its succinctness. Each book packs a fair wallop against the godly, which is singularly welcome to those of us who have suffered many dreary years having God's message stuffed down our throats by the religious self-righteous (the 'unco guid', as Burns called them).

However, neither author really pins down the beast, which is scarcely surprising given its intractable, amorphous nature.

We doubters can live with that. Most religions look the same to us in any case. Only the holidays are different. But what really troubles us, and what is not really tackled by either author, is the fact that a belief in the existence of deities invariably comes with an intense urge to shove that conviction down everyone else's throats and to proselytise.

This can lead to tensions, to put it mildly, a point succinctly made by my old friend, Katharine Whitehorn, the former Observer columnist. As she once wrote: 'Why do born-again people so often make you wish they'd never been born the first time?' But then, some religious questions can never be answered.