The above graph shows a correlation between religiosity and earnings based on the GDP of several countries. The graph shows that the more religious a nation is* the less they earn.
Now correlation doesn't demonstrate causation, But there is a link there somewhere. Perhaps lower educated people are more likely to be religious (my personal theory as previous studies have shown the religious to have on average a lower IQ) or perhaps poverty makes people more likely to turn to faith.
Whatever conclusions you want to draw from this graph, There is a link between earnings and religiosity.
* Religiosity is measured using a three-item index ranging from 0-3, with 3 representing the maximum religious position. Respondents were given a +1 if they believe faith in God is necessary for morality; and +1 if they say religion is very important in their lives; and +1 if they pray at least once a day.