Occipital nerves run from the top of the spinal cord up through the scalp. When they become inflamed or injured, pain in the back of the head or the base of your skull can occur. Occipital neuralgia causes intense pain, like a sharp electric shock in the back of the head and neck causing pain when moving the neck, pain in one or both sides of the head, sensitivity to light are a few symptoms. Causes can be trauma to the back of the head, neck tension, tumors, cervical disk disease are some causes.