It is really common to have sensitivity in the hair shafts from wearing a hat all of the time. This is because the pressure from the hat tends to bend down the hair shafts, creating tension at the base which can lead to sensitivity and pain. I would suggest that first you stop wearing the hat for a few weeks to see if that clears up the problem. If so, then there is no need to worry
Another common cause of pain in this area is exposure to chemicals, especially hair bleaches and dyes. If you use these products, you may also wish to discontinue them to see if it makes a difference.
On the other hand, if the pain continues, then you may want to see your doctor
. There are several other conditions of the scalp that can lead to pain and discomfort or sensitivity. One of the most common of these is seborrheic dermatitis. This is an inflammatory condition of the scalp that leads to redness, dryness, itching, and flaking or scaling (dandruff is a very mild form of seborrheic dermatitis). The condition can be easily diagnosed by your primary care doctor
and, if present, there are very effective treatments that are available.