NO! It isn’t a sin to cover your head with a cap while praying
1Corithians 11 talks about this as Jonathan_1995 pointed out but most fail to see the answer itself within this same chapter. If I may point out a few scriptures.
First reason why it isn’t a sin to cover your head with a cap while praying:
(1Cr 11:4 Every man who prays or prophesies with his head covered dishonors his head.)
-This doesn’t say you have dishonored God but your own head
Second reason why it isn’t a sin to cover your head with a cap while praying:
(1Cr 11:5 But every woman who prays or prophesies with her head uncovered dishonors her head—it is the same as having her head shaved.)
(1Cr 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.)
-So does every woman have to cover her head with a cap, hat, cloth, etc… in order to refrain from sinning… NO! neither does a man have to cover his head with a cap. The Lord is talking about bringing disgrace to oneself not sinning. If it sounds funny to be disgraced in regards to wearing a cap then you should realize he is not talking about a man made cover.
-Notice the reference to shaving her head(hair)
Third reason why it isn’t a sin to cover your head with a cap while praying:
(1Cr 11:14-15 Does not the very nature of things teach you that if a man has long hair, it is a disgrace to him, but that if a woman has long hair, it is her glory? For long hair is given to her as a covering.)
-So as you can plainly see in this last scripture it says, “hair is given to her as a covering”. So basically men “should” have short hair (uncovered heads) and women should have long hair(covered heads). Does that mean a man with long hair and a woman with short hair sins… No! because it does not dishonor God it dishonors the person.
It’s ok to wear a hat, cap, umbrella, kippah, Yakamah and etc… for the scripture is referring to hair as a form of covering not caps. You have not sinned but it’s polite to take your hat off when your in doors, when you great a woman or when your at a funeral.
The Lord bless you and keep you.