I'm no expert, but I will once in a while get headaches running when it's hot if I don't hydrate properly. For me, it's drinking lots of water well before I start. When it's really hot, I will also down half a Gatorade (or the Costco equivalent) before I run. I generally don't bring water on my run unless I'm stopping to do my TRX thing in the middle of it. As soon as I get back, I drink more Gatorade (no matter what the temps), take a shower, then drink a bunch of water.
Key is getting enough water in well before the run. When I don't do that, even if I hydrate like crazy when I get back, I will still often get the headache.