Well, you had better go to see a doctor, as there are many possible reasons for your sore eyes. Some eye diseases can lead to very serious damage if left untreated.
For the diet, you need to avoid having spicy and irritate food and add food with vitamin A, B into your diet. They help to recover your eyes. But diet is no substitute for medicine. After all, you need to check what's wrong with your eyes.
Yes, your sore eyes may be caused by the dryness. You could eat more food with vitamin C to make your eyes get moisture. Thus you will get rid of the sore eyes. You could eat more vegetables and fruits which are very rich in vitamin C. You could also have the good rest for the eyes, doing the warm compress to moisture it more.
Well, for your situation, the following food might be helpful in some ways and you can consider to add to your diet. The green vegetables and carrot, spinach, celery, broccoli, sesame, such fresh plants product will be good for your eyes. You may find it effective and absolutely without side effects. Meanwhile, enough water can be effective and help your eyes get better. By the way, you'd better not eat the stimulating or spicy food, which may even cause your sore eyes more serious.