Traditional etiquette calls for removing your hat in someone's home, at the dinner table, in a place of worship, and during the national anthem. Leaving a casual cap on in stores, airports, or stadiums is generally accepted. When in doubt, taking it off is the safe choice.