I would say this to anyone, regardless of what they're experiencing: If you are asking if you should see a doctor, the answer is always YES. Any new pains that concern you should be looked at by a physician. If it turns out to be a cold, maybe going to a dr will seem like a waste of time, but if it turns out to be something more serious, you'll be glad you went.
How are you? Are there other symptoms present? Is this the first time that you experienced the headache? This could be due to exertion headache, which presents with head pain during or following physical or passive exertion, including sneezing, coughing, and even bowel movement. This is usually associated with migraine or cluster headaches. However, you need to have this checked by your doctor or be referred to a neurologist for proper diagnosis and to rule out organic diseases like aneurysms or blood vessel malformation. Take care and do keep us posted.