Andrew Gelman discusses a paper that finds a link between religiosity and the state of the economy:
Praying for a Recession: The Business Cycle and Protestant Religiosity in the United States In Economics, by Andrew Gelman: In the course of commenting on our article on religion, income, and voting, David Beckworth links to this interesting paper on religiosity and the business cycle:
Mainline Protestant denominations--which tend to have higher income earners--do well in terms of growth during economic booms while evangelical Protestants denominations--which tend to have lower income earners--actually struggle. (During economic downturns the outcomes are reversed--evangelicals Protestant denominations thrive.) In general, I [Beckworth] find mainline Protestants to have a strong procyclical component to their religiosity while evangelicals have a strong countercyclical component. These findings can be explained by again appealing to the labor-leisure choice explained by economic theory.
David Beckworth follows up:
Economic Conditions and Religiosity, by David Beckworth: Andrew Gelman graciously takes note of my research on the business cycle and religiosity over at Statistical Modeling, Causal Inference, and Social Science. One of his blog readers emailed me and requested I explain more thoroughly how macroeconomic shocks could affect religiosity. Below is an excerpt from a forthcoming article where I attempt to explain the relationship in less technical terms :
The first thing economic theory says is that the cost of being religious can change over the business cycle. During an economic boom individuals may find increased opportunities for higher earnings. The potential for higher earnings, in turn, make time-intensive religious activities like church attendance costly for these individuals. Consider, for example, a Southern Baptist from a low-income family being offered the opportunity of getting overtime pay to work at a retail store on Sunday morning. For this Southern Baptist, going to church suddenly becomes a lot more costly and thus, increases the likelihood of him opting for work instead of church. On the other hand, during an economic downturn, time-intensive religious activities become less costly as opportunities for earnings decline. Here, the overtime opportunity for the Southern Baptist disappears and church attendance suddenly becomes more affordable. This idea that higher earnings lead individuals to substitute out of leisure activities, like going to church, into more work and vice versa is called the substitution effect. It implies there should be a countercyclical component to religiosity.
There are, however, two countervailing forces against the substitution effect. The first one is called the income effect and says that the higher earnings also mean individuals can work fewer hours than before and still get the same pay. They, therefore, have more time for leisure activities, like church attendance, without a loss of income. Consider, for example, an Episcopalian whose consulting business was able to increase its fees because of the increased demand for its services during an economic boom. The Episcopalian can now afford to take on fewer consulting projects, without a loss of income, and enjoy more time at church. During an economic downturn, however, the consulting fees would drop. The Episcopalian would now have to work more hours to maintain his income, leaving less time for church. The second countervailing force is something called the wealth effect. The wealth effect says that as individuals’ wealth increases from valuations gains in their homes, stocks, and other assets they have less need to save and thus less need to work. In turn, there should be more time for church attendance and vice versa. Imagine now that the Episcopalian had a large amount of funds in the stock market during a stock market boom. His wealth would increase dramatically and make leisure activities like church attendance more affordable. Both of these effects imply there could be a procyclical component to religious activities.
Economic theory is generally silent on which of these effects dominates the decision to work. Research has shown, however, that evangelicals Protestants typically fall into a lower socioeconomic grouping than mainline Protestants (Pyle, 2006). This suggests that the substitution effect should be more important for evangelical Protestants. In other words, since evangelical Protestants are starting from a lower income level, like the Southern Baptist above, they should be eager to take advantage of higher earning opportunities, whereas mainline Protestants, like the Episcopal above, who already have relatively high income levels may see less need to do so. Moreover, mainline Protestants have more wealth and should therefore be more sensitive to the wealth effect compared to their poorer evangelical Protestant brethren. A priori, then, the changing cost of being religious perspective points to evangelical Protestants being more countercyclical in their religiosity than mainline Protestants.
The second thing economic theory had to say about this issue is that individuals generally desire to have a steady stream of housing, clothes, food, and other consumption over the business cycle. During a recession individuals may become unemployed or find their earnings fall. To prevent these developments from being disruptive, individuals may turn to churches for consumption needs such as shelter and groceries. Individuals may also turn to churches for less tangible consumption needs such as a sense of certainty and divine guidance in a job search. Such a response implies there should be a countercyclical component to religiosity. Note, however, that the wealthier mainline Protestants are in far less need of churches to provide consumption for them. In addition, mainline Protestant denominations often place less emphasis on absolute truths than evangelical ones and, as a result, are not able to create the same sense of certainty or appeal to an all powerful, job-providing God. Individuals, therefore, may choose to join an evangelical Protestant denomination rather a mainline one during a recession. Consequently, the consumption smoothing ability of churches also points to a stronger countercyclical component for evangelical Protestants.
 Conversely, these same individuals may find a mainline Protestant denomination more appealing than an evangelical one during an economic upturn when the need for certainty and employment are less pressing concerns.