All right, you shoud know eye infection varies a great deal, sometimes they are just ordinary red eyes, sometimes they could be pink eyes which is contagious and could make you suffer a lot. It all depends, if the infection is not communicable to other people, you are good to go to school, but you also have to be careful. I still recommend you staying at home before you return to school. Try to consult a doctor and follow his advice.
It depends on your situation, if it's really serious, you'd better not go to school.
Once eyes get infection, they can easily get serious when people over use their eyes. So stay at home, relax, then you can recover soon.
By the way, it wouldn't that harmful, if you go to school. But you should be careful, do not get your classmates get infected.
No matter what, you need to keep your eyes clean, then use eye drops to facilitate your recovery.