That's a very interesting hypothesis. A quick Google search turned up this review from 2014, which
concludes that religiosity may be associated with satisfaction at work, which might translate into working longer. A compounding factor is that practice of some religions requires adopting a healthier lifestyle. Anticipating longevity requires more retirement savings, and may cause people to delay retirement. The authors note that people frequently become more religious over time.
http://www.tandfonline.com/doi/pdf/10.1080/15528030.2013.855967
I am profoundly non-religious, FWIW.