You don’t need a license to hold a wedding in a specific place- they don’t even ask you where you’re getting married when you apply for a marriage license (at least they don’t in North Carolina, where I got married).
But if the wedding is being held on private property, you have to have the permission of the owners or tenants. AFAIK, churches, synagogues, mosques, and the like are private property, so you have to have the permission of whoever runs the church to have a wedding in a church. They can put pretty much any conditions they like on that- they can require that one or both of you be members of their religion or their congregation, they can require that a certain officiant be used, they can require that a specific ceremony be used, they can require that certain foods or beverages not be served, they can impose a dress code, or they can of course charge a fee. Of course, the same would apply to getting married on any other private property, not just a church- the owners or renters of the property can require pretty much any conditions they like to allow a couple to get married there.
Some specific examples: Some Catholic churches in the US won’t allow a couple to get married there unless one of them is a parishioner of that specific church (it’s not enough just to be Catholic), they won’t allow anyone other than a Catholic priest to officiate at a wedding in their church, and they won’t allow any ceremony other than one of the Catholic wedding ceremonies to be performed in their church. Some Protestant churches won’t allow alcohol to be served at a wedding or reception held in their church (some secular venues might do the same thing, for liability reasons). Some synagogues won’t allow you to serve non-kosher food at a wedding or reception on their premises, and I can’t see most Conservative or Orthodox synagogues allowing anything other than a Jewish wedding ceremony- they wouldn’t allow a couple to get married by both a priest and a rabbi in their synagogue.
There’s also the matter of getting the priest, minister, rabbi, or whoever is officiating at your wedding to agree to officiate at the place you choose. They’re allowed to require any conditions they like, too. Conservative and Orthodox Jewish rabbis generally won’t agree to co-officiate in a ceremony with a clergyperson from another religion (Reform Judaism leaves that decision up to each individual rabbi, but any Reform rabbi would be within their rights to refuse to do it). A rabbi can say he or she will officiate at your wedding only if any reception you have is kosher- the one who officiated at my wedding did that. An officiant can say they will only officiate at your wedding if the wedding party conforms to a certain dress code during the ceremony- again, the rabbi at my wedding did that (he asked that there be no bare shoulders or extreme cleavage, and that the men wear yarmulkes). You don’t have to have a clergyperson officiate at your wedding to have a legal marriage, but the choice of officiant is a major emotional deal for some brides, grooms, or family members.
Personally, I do think it’s rather shallow to choose a church to get married in just based on it being pretty. That’s not so bad, but what is bad is if you choose to get married in a church and then are surprised or offended when that church has rules about who can get married in their church and how. It’s their church, not yours, and you shouldn’t expect them to bend or break their religious rules just so you can get married in a pretty church. Of course, I also think it’s disrespectful and childish not to find out and obey the rules of any venue where you’re getting married, religious or not.