Jesus said that all the hairs of your head are numbered and that
Luk 21:18, But there shall not an hair of your head perish.
Therefore, I will let you make the conclusion about those who are bald and who would need a hat to protect their head from sunburn.
Of course, it was either Elijah or Elisha who was mocked by teenagers over the fact that he was bald.
But for the most part, the Lord is going to preserve the hair of those who trust in Him.
And even if He doesn't, there is such a thing as suntan lotion; or simply not going out into the elements when the sun is shining hot.
I am not saying that if a man wears a hat, that he isn't saved...
I am saying that it is a matter of respect that is the issue here.
What is in your heart will determine your outward behaviour. Is this not the epitome of James' statement that faith without works is dead?