The greater and lesser occipital nerves run from the area where the spinal column meets the neck, up to the scalp at the back of the head. When these nerves are injured, which can be the result of trauma, tight neck muscles, and nerve compression, a person may feel piercing, throbbing, or electric-like chronic pain in the upper neck, back of the head, and behind the ears, usually on one side of the head.
Typically, the pain of occipital neuralgia starts in the neck and then spreads upwards. As the pain spreads, the scalp may even feel tender to touch, and some experience sensitivity to light.
Osteoarthritis, tumors or other types of lesions in the neck can be the root of the problem, in addition to trauma. Repeat behavior of keeping the head in a downward and forward position can also be a factor, as can infection, gout, and diabetes.