Sore eyes often respond better to topical eye drops than to oral medications (ie tablets).
Some of these eye drops can be bought OTC (over the counter), whilst others can only be supplied by a Pharmacist to a written prescription.
Unless you are 100% certain of what is causing your sore eyes it is vital that you seek a qulaified persons advise. Your Eye Care Practitioner has the experience, knowledge and specialist equipment to examine your eyes so can best advise you whether a OTC treatment is all you need or whether you need something stronger that can only be prescribed by your GP or whether you are best examined by an ophthalmologist.
Unfortunately using the wrong medication can make it more difficult to determine what the underlying problem is.