What the investigators (David Atkins and Deborah Kessel from Fuller Theological Seminary in California) did was to analyse data from the 1998 General Social Survey of the USA.
The survey is massive - 3,000 questions - including 37 on different aspects of religion. They grouped these into 9 categories, and analysed them together with other factors that influence infidelity - age, gender, income, and marital happiness.
Now, there are some caveats that need to be applied here. This was self-reported infidelity, something that people are likely to under-report, and attendance, which is often over-reported. And it's a cross-sectional analysis, like most of these sorts of things, so cause-and-effect are open to question.
But it seems that religious attendance is associated with less infidelity. The authors put this down to the likelihood that couples that go to church together are more likely to stay together, for a number of reasons.
However, I wonder whether regular church goers are simply more conscientious and family oriented than other religious people. That's why they go to church. For non-religious people, I suspect you would find a similar thing for those people who commit to secular activities.
There's another interesting fact that they found. It turns out that there's an interaction with marital happiness. Now, people who are not too happy with their marriage are, unsurprisingly, much more likely to have affairs. However, it's here that the effect of attendance is biggest.
People who are unhappy with their marriage and who never go to church are 23% more likely to have an affair than people who are happy and never go to church. However, people who are unhappy with their marriage and regularly go to church are only 12% more likely to have an affair than people who are happy and regular church goers,
In other words, church going seems to be effective in keeping people stuck in unhappy marriages.
One last thing. From the graph above, you can see that people who feel that they are 'near to god' seem to be more likely to have an affair. Atkins & Kessel dug into this a little deeper, and it turns out that people who are near to god but do not go to church are actually 25% more likely to have an affair - which is statistically significant.
There are several possible reasons for this. It could be that these people are disgraced, rejected from their communities, and so exclude from communal activities. Or it could be that these are people who have religious differences from their spouse, and these differences lead to less church going and more infidelity!
Atkins, D., & Kessel, D. (2008). Religiousness and Infidelity: Attendance, but not Faith and Prayer, Predict Marital Fidelity Journal of Marriage and Family, 70 (2), 407-418 DOI: 10.1111/j.1741-3737.2008.00490.x
This work by Tom Rees is licensed under a Creative Commons Attribution-Share Alike 2.0 UK: England & Wales License.