I think GDP might be a proxy for education here.
A graph of educational standards vs religion might be even more revealing
You also have to consider that there is a possible correlation between being poor and being religious. As bad as that may sound, religion brings hope to a lot of people who do not have many other sources of it.
Looking at it I noticed that I'm from one of the least religious countries in the world (Denmark).