If your child gets an eye infection, be sure to visit a doctor so he or she can diagnose if it’s a bacterial or viral infection. If the infection is bacterial, treat it with antibiotics and keep your child home from school for a few days until it clears up.