Re: hats on men and certain religion. Men are usually required to take hats off inside Eastern Orthidox churches. Women are usually asked to wear a scarf covering their head. My source - personal experience touring monasteries and churches in Europe.
And this:
“While there is no specific dress code, the general rule is for men and women is to dress appropriately, modestly and respectfully, as before the Living God. Traditionally this has meant that women wear dresses or skirts that fall below the knee, while men wear pants. We ask that you not wear shorts, mini-skirts, tank tops, low-cut or strapless dresses (unless covered by a sweater, etc.). You may notice that some Orthodox women wear scarves on their heads (not hats), but this is not required. Men are asked not to wear head coverings (baseball caps, etc.) in the nave.”
This is from a Greek Orthodox Church.