Cut off your hair and cast it away; raise a lamentation on the bare heights, for YHWH has rejected and forsaken the generation of his wrath.
Jeremiah 7:29
The Bible never says that it's a sin to grow your hair long or to shave it all off, in fact there are times when a person was required to do both. However, in the ancient Hebrew culture, a shaved head was a symbol of humility and shame. It wasn't an honorable thing. See the Bible's treatment of lepers, war brides, priests, and Nazirites.