It is now well established that good institutions are crucial for a healthy economy. But you do not create good institutions with a magic wand, and they do not export well from one country to the next. So what makes good institutions? For one, former colonial masters matters, in particular former English colonies tend to have better institutions than other former colonies. At least for those countries, the origin of the legal system matters. For more developed economies, this is less obvious.
Niclas Berggren and Christian Bjørnskov find that religiosity, as measured by how important religion is in daily life, has an impact on institutional quality, especially in democracies. A negative impact. This seems to indicate that religion has some devious implications on the democratic process. How still needs to be established, though, but seeing how churches try to influence the political process, especially by getting poor people to vote against their interests, that does not surprise me too much.