There is a difference - recognized in both western Chinese medicine - between primary and secondary types of headache. A primary headache (like the tension, migraine, or cluster type) is in itself a clinical condition rather than a symptom of something else. In contrast, secondary headaches are the result of other medical conditions. Most commonly they are caused by sinuses, allergies, head injury, brain tumors, and even dental issues. Where acupuncture is really effective is for the treatment of primary headaches - especially those common and painfully annoying tension and migraine headaches.
To give you some background (and this gets rather scientific), our internal organs are regulated by the sympathetic and parasympathetic nervous systems. The former is the one engaging the "fight or flight" response during stress. The later balances this by activating the relaxation response. When you’re stressed for a long time (or overly-stressed in general), the sympathetic system overpowers the parasympathetic, leading to your neck and upper back becoming stiff, your eyes feeling heavy, and ultimately you developing tension headaches, anxiety, irritability, and even digestive issues.
Acupuncture has been effective in treating headaches for thousands of years by increasing blood flow in the tissues by dilating small vessels around the stimulated area. Similarly, acupuncture helps prevent migraines by decreasing muscle tension via increased activity of the parasympathetic nervous system.