Caffeine can cause headaches. Caffeine also is something that relieves headaches, which is why it is in a lot of pain medication. the caffeine helps to reduce inflammation, and in headaches the caffeine narrows the blood vessels, which decreases pain. even the withdrawl of caffeine causes headaches because when you stop drinking caffeine after a while, your blood vessels then start to expand again, causing the headache.