SN instructed patient / caregiver that Ophthalmic erythromycin is used to treat bacterial infections of the eye. It is also used to prevent bacterial infections of the eye in newborn babies. Erythromycin is in a class of medications called macrolide antibiotics. It works by killing bacteria that cause infections. Erythromycin eye ointment may cause side effects. Tell your doctor if any of these, symptoms are severe or do not go away, redness, itching, stinging, or burning of the eye.