It is possible that the act of smoking in some way causes people to be less religious. This could occur, for example, if smokers are ostracized or less welcome in religious settings. It is also possible that an additional factor such as mental state or an addictive personality causes certain individuals to be more likely to smoke while at the same time causing them to be less religious.
It is also possible that the relationship is straightforward: Something about frequent church attendance could in turn cause people to be less likely to smoke. One explanation for this could center on religious doctrine and training. A number of religions have formal or informal constraints on smoking, and presumably those who are most adherent to those religions, as measured by church attendance, would be less likely to smoke.
The Church of Jesus Christ of Latter-day Saints or Mormon faith provides an example. Mormon doctrine prohibits smoking, and although about 8% of Americans who identify as Mormons smoke regardless, this smoking rate is less than half of the 20% found for the general adult population in 2012.