Hi Lexi,
I'm not sure exactly, but I know that when I was in school taking Massage Therapy we learned all about detoxifying and the effects. After I give someone a massage,(which flushes out the toxins in the body) I have to tell the client to drink a lot of water and stay away from caffeine, tobacco, or any other type of stimulant since through the massage, a lot of toxins have been released into the bloodstream. If you have caffeine or alcohol, it will hit you twice as hard as it would if you had not been detoxified. I think it's kind of the same thing with the Mountain Dew, which is really high in caffeine and sugar. If you haven't been drinking it and then you re-introduce it into your system, your body is not used to it and that's probably what caused the headache. Especially if you've been exercising by walking a lot , like you said, which is just another way of detoxing (especially if you work up a good sweat). That would be my guess, although someone else may have other suggestions as to why this happened. In any event, it's great that you're putting healthy things into your system and walking alot!
Also, I always carry a water bottle with me practically everywhere I go. Dehydration can cause massive headaches, and it's good to have the water handy in case you are in a situation where there's only pop available.
Sujin