lljkk gave a great summary on the how many evangelicals became political. Before then, it was often seen as not their business (and there are still certain groups that fall into that category, evangelical is dozens of denominations), but certain movers in the pulpits made power grabs and continue to make everything about a battle for the country's soul. Look into US TV evangelicals, many of them do it, alongside asking for people's money.
Corruption is rife, families creating power bases for themselves - it happens in religious institutions as it does in corporations. Really, it's just a culturally supported tool.
As for the Supreme Court and how religion can get involved in it, the Constitution gives pretty much no guidelines on justices. The President nominates and the Senate advices and consents. It doesn't say how they do that. There is no standard that must be applied - they can say yes or no for any reason, including that the nominee won't vote on constitutional matters the way the senator would like or just because they feel like it so yes, there has always been a chance of religious motivation. It doesn't even say how many judges there needs to be or anything to compel them to vote now - in 2016, Antonin Scalia died in February, and the Senators withheld the vote until Obama was out of power, and they is nothing constitutionally wrong with it.
Also, as for wealth being linked to a decline in religion - there is some evidence of that for individuals, though it's tends to be more that some religious beliefs directly contribute to lower wealth (women belong in the home, having a lot of kids, restrictions on education) and wealth often gives more access and an ability to be free of religious institutions. In some places, where those in power use religion as part of other institutions, it's harder to get free of it -- and even when not in political power, institutions can find other ways.
I mean, Saudi Arabia is a wealthy country, in the top 40 in GDP I think, but all our countries are willing to bend over backwards for them for their resources. Countries are willing to bend over the US for their resources, both the religious and non-religious communities. Even in the UK with reduced religious adherence, churches must be placated as they control large parts of the resources used for educating children so required religious education and mostly Christian collective worship it is.
It's pretty impossible to get rid of it at this point without a major overhaul, it's so meshed in at this point and, in the US, many churches are even more meshed into certain communities because there is much less of a social safety net.