From personal experience, yes headaches can be caused from heat, or your body getting overheated. I get headaches when I'm too hot. You are in no medical danger, except perhaps from heat exhaustion. There is nothing wrong with you. The best thing to do is try and keep cool, keep in the shade, and apply a cold compress.