Well, it could be a lot of things. Was it a hot day and were you drinking enough fluids? You can be a bit dehydrated and not realize it. I've had a couple of close calls with heat stroke and it can really sneak up on you. I'm now very cautious as one of the warning signs when it starts to get worse is the rapid onset of a headache.
I have, once, had a very quick reaction to bad food - about 20 or so minutes and I was very ill for 10 days, part of that spent in the hospital being treated for a food born illness.
We'd need to know a bit more detail to say if it was food, or the result of heat and lack of proper hydration. How quickly did you recover afterward?
Drinking too much fluid, esp sweet drinks like Hi-C or something in the heat can also make you vomit, as happened to me once after 3 hours on the tarmac at an airshow. I hydrate now with mostly water - gatorade sometimes if I know I'll be losing a lot through sweat.