The custom originates in Judaism, and different arguments are given for it. Married women, in particular, cover their hair in an act of modesty. They argue a woman's hair should be reserved for her husband (not so different from the customs in Islam).
Religiously it is also an act that separates one from the world.
Within Christianity there are additional scriptures and Church Fathers who reinforce such head coverings. Here's a line from Paul on the subject:
1 Corinthians 11:6 For if a woman does not cover her head, she might as well have her hair cut off; but if it is a disgrace for a woman to have her hair cut off or her head shaved, then she should cover her head.
He seems to quibble over this point a bit, but ultimately takes the stance of tradition on the matter:
1 Corinthians 11:13-16 Judge for yourselves: Is it proper for a woman to pray to God with her head uncovered? 14 Does not the very nature of things teach you that if a man has long hair, it is a disgrace to him, 15 but that if a woman has long hair, it is her glory? For long hair is given to her as a covering. 16 If anyone wants to be contentious about this, we have no other practice—nor do the churches of God.
The Church Father Tertullian, around 200 AD, wrote "On the Veiling of Virgins." In this writing he argues that not only should married women cover their heads, but that all women should do so. (for a translation, see here: On the Veiling of Virgins).
So the practice is rooted in a Jewish tradition and the wider mid-eastern culture. It has additionally been expounded on both in the Christian scriptures and the subsequent writings of Church Fathers.
As for men, Paul also makes the argument that men should NOT have their heads covered.
1 Corinthians 11:4 Every man who prays or prophesies with his head covered dishonors his head.
1 Corinthians 11:7 A man ought not to cover his head,[b] since he is the image and glory of God; but woman is the glory of man.
This breaks a bit with modern and Orthodox Judaism, where men wear a covering in prayer (if not all the time!).
Despite the scriptural arguments, I rarely if ever see Protestant women wear head coverings. Ultimately it seems to come down to a given sects culture. In America most would not think it immodest to not cover one's hair.