David Berlinski, who has no religious affiliation, argues that religion is an important basis for morality, and this is certainly a defensible position. Believing that nothing one does is hidden from the eyes of a just and powerful supernatural being is a strong psychological disincentive to doing shameful things.
Of course, there is a long tradition of skeptical conservative thought, going back to the ancients, which advocates the necessity of a 'noble lie' to maintain social order.
Leaving aside the practicality of such an approach, I shy away from it on moral grounds. It just feels wrong to me, but maybe this is due to a Puritan streak in my thinking. I see the logic of the noble lie, but I don't like it. I resist the thought that we're in the sort of world where you have to lie to people on a routine basis. (Though I'm comfortable with the idea that, in certain situations (like just prior to an exit from a currency union, for instance) untruths must be told.)
It is certainly true that people can and do behave well without believing in a supernatural watcher, but it is an open question as to whether enough people will behave well enough to guarantee a smoothly functioning secular society. There is little evidence to draw on, as widespread non-belief is a relatively recent phenomenon. And what evidence there is is not encouraging.
The revolutionary secular regimes of the 20th century felt the need to replace the eyes of God with informers and secret police, and our current secular democracies are implementing unprecedentedly extensive regulatory and surveillance networks in an attempt to maintain law and order.
I suspect that, while at the level of the small or culturally homogeneous group there is generally no problem with secularism, problems do emerge when societies are larger and culturally mixed. All the complex societies of the past of which I am aware incorporated either religious elements or the mechanisms of totalitarian terror (or a mixture of the two).
We in the West seem to be in a situation where prosperity is threatened, the social fabric is slowly failing and governments are moving into areas which once were self-sufficient or the preserve of independent and autonomous institutions (like families, churches or professional bodies).
The other side of the coin is business and trade, which creates prosperity but which depends for its effective functioning not only on a legal framework (which governments can provide) but also on a culture of trust and truth-telling (which governments are powerless to protect and, of course, quite unable to create).
Life will go on, no doubt. But the spontaneous order and cultural richness which is the fruit of centuries of tradition is failing and falling away. Life will go on, but in a culturally impoverished form.
And individual freedom, the idea and the reality of which developed and flourished in Western countries, is just one of many cultural treasures which we are losing as populist governments attempt to impose order on fragmenting and increasingly rootless populations.
We certainly can't rely on a noble lie to save us. No one would believe it.
Because the strategy of the noble lie is predicated on the existence of a respected political and/or cultural elite and these conditions do not exist and are unlikely to come into being any time soon.