It depends on the person. Some people find that caffeine helps with their migraines, while it acts as a trigger for others. In general, overuse of caffeine tends to be a cause of headache as it makes one increasingly dependent on it. People who drink a lot of caffeine can get headaches when they miss out on their usual caffeine intake.