This is one of those passages in the Bible which has been taken totally out of context over the years and has been used as a weapon to browbeat young believers into a form of slavery, rather than freedom. It takes regular study of the Bible to understand and to differentiate between what was relevant only at that time: remember Paul was writing a letter to a Church, he wasn't writing a treatise for all time!
We must read this passage with the understanding that principally this is about a situation long gone. Remember that there is a Near Eastern context here and, just as many women in that area wear veils today to protect their modesty and to declare that they are married, so in Paul's day married women wore veils. Paul isn't saying that this is the right way to be for all time, just as he didn't condone slavery. What he did was to look at the world and understand that Christianity was about revolution, but a revolution that was firstly spiritual. The Church treated slaves and freemen as equals, men and women as equals- Paul states this in verse 11. A few centuries ago, slavery was forbidden and slaves emancipated through Christian efforts. In the last century in the West, women have become treated as equals with men, although I know that there is still work to be done there. The revolution which changed the hearts of people has over the time between when Paul was alive and today, transformed society. Where would be without our Christian history? To dive deeper on this subject, read 'Dominion' by Tom Holland.
In Jewish religious worship, women were segregated from men. When Fi and I visited the wailing wall two years ago, we were shocked to observe that the area was divided in two. A very small area was crowded with women and non-Jewish men; the far greater area was very lightly populated with Jewish men! In India, and I'm sure other countries, women sit separately from men.
Again, context: Corinth was renowned for its morally lax standards and Paul would have felt that it was better to err on the side of being too modest. Remind yourself of what he has just written about food sacrificed to idols!
To conclude, this has absolutely nothing to do with whether women should wear hats to church, but it does give us three permanent truths:
1. It is better to err on the side of strictness rather than laxity.
2. Paul stresses the essential partnership of men and woman, neither can live without the other.
3. Paul counters those who love to be argumentative, by stating that Christians should practice the art of remaining at peace with one another whilst understanding and accepting that there may be differences.