All over the world their are different dress codes and etiquette for different occasion. One would dress in a formal outfit for a wedding, but wear comfortable and casual clotting for shopping, travelling or attending a sporting event.
All culture have specific rules and regulations for people visiting religious places and participating in religious ceremonies. On most civilizations, covering the head is considered to be sign of respect, modesty and humanity.
In Christianity, a tradition that has faded in the horizons of the post-Vatican II era is the practice of women covering their heads in church. Both men and women of the Old Convent covered their heads in temple; the custom that only women should cover their heads was preached by the Apostle of the Gentiles. Thus this custom, rooted in scripture, became a tradition practiced by Catholic women from the earliest days of the church.
In Islam, both men and women are expected to dress appropriate before visiting mosque. For women, all skin ahs to be covered; ankle-length skirts or pants or required; sleeves should reach to each wrist and hair should be covered by headscarf. The head cover for Muslim women is specifically mentioned in Kuran (24:31). Men have to wear long pants and plain shirts without message or slogans.
Sikhism, too, has a protocol for both men and women. When entering the Gurudwara one is expected to remove shoes and cover the head as sign of respect towards the sovereignty of the GURU Granth Sahib. Physiologically as explained in Sikhism, the greater part of the body's energy escape through the head. The top centre of head, the crown chakra, is a focal point of energy. Strong and sacred vibrations are received by being in the Gurudwara and in the presence of Guru Granth Sahib. To help retain that energy, heads are covered.
Visiting Hindu Temples
Visiting and worshipers to Hindu temples are required to remove shoes and other footwear before entering. Additionally, it may be customary, particularly at south Indian temples, for men to remove shirts and to cover pants and shorts with traditional cloth known as a Vasthiram.
Most rituals in North Indian temples are very simple in stark contrast to south Indian temples, which have elaborate practices. For example, a strict dress code exist for a people who enter the Guruvayur Temple. Men are to wear Mundu around waist, without any dress covering their chest. Girls and women's are not allowed to wear any trouser-like dresses or short skirts. They are allowed to wear a sari and girls are to wear long skirts and blouses. Presently the dress code for women's been relaxed, and salwar kameezes or churidar pyjamas are being allowed.
North Indian temples often tend to be less orthodox. Like all other temples in India, footwear is strictly prohibited. Unlike in northern India, in Kerala and other southern Indian states, Hindu women do not cover their heads in temples. In traditional north Indian homes, women still cover their heads in front of in-laws and elders as a sign of appreciation and respect. Thus, covering the hair in temples is mostly a north Indian custom and is not mandatory. It is an outward sign of displaying feelings of deep respect, humanity and gratitude towards the divine.