So I assume you have properly treated the eye infection - antibiotics, removal of the contact for the length of time specified by the opthamologist?
Or, are you wearing one contact? Because that can certainly cause a headache (wearing one contact)
Otherwise, a headache can be due to stress. It can also be a sign of such things as diabetes or hypertension.
It is standard medical practice to recommend an evaluation for any new onset headache. So, you really need to go in to see someone for an evaluation. If it was typical for you to get headaches every so often then it would not be considered necessary, but you would not have written us if that was the case most likely.
This will involve blood testing to look for any abnormality and a simple neurological exam. Depending on whether any thing abnormal is found, will determine if anything further is needed such as an CT scan or referral to a neurologist.
Be sure you are not dehydrated. This is a frequent cause of headache, along with stress. Lack of adequate sleep also will lead to headaches over time, if not initially. Also, an elevated blood pressure can cause headaches. Elevated blood pressure is a serious issue - can lead to kidney damage and failure, and is detrimental to your whole cardiovascular system, including the heart.
Again, it is recommended that you see your health care provider, because physiological causes need to be ruled out. This takes blood sample analysis and testing of reflexes etc.
In the short term, her is some information about things to do to relieve headache (and stress, just in case that is an issue. Don't forget to drink at least 4 ounces of water every hour or two. Getting a bottle with a filter can make this easier to do)
Please reply with any questions.