*sigh* Number one, most of the world in general is religious so it's a good idea to keep that in mind.
Number two, you might want to look at WHEN these nations became advanced economies. Were they religious then? This seriously wounds the causation
Now there may be a correlation
here which simply amounts to the fact that economic prosperity tends to lead to irreligion.
There is some grounds for that conclusion even when observing the ancient world, where prosperity, while not usually leading to positions like Atheism and agnosticism often lead to religious apathy.