It has been common practice for over 100 years to place an antibiotic ointment in the eyes of the newborn to prevent diseases that may cause blindness as the child grows.  The most common diseases are gonorrhea, chlamydia, and syphilis (especially in the past).

At the turn of the century, it was silver nitrate and it was very irritating to the baby’s eyes.  Today, erythromycin antibiotic eye ointment is the commonly used treatment because it has many fewer side effects to the newborn.  It is placed in the lower lid of the eye by the nurse or midwife by two hours of age.  At home, it is done during the newborn exam which takes place next to you on the bed.  It is a minor intervention and usually causes no physical problems to the newborn, although an allergic reaction can occur.

Evidence Based Birth has a very good explanation of the history, pros and cons of newborn eye prophylaxis.

In my practice, the mother can opt to test for gonorrhea and chlamydia and, if negative, decline the erythromycin ointment.  This is because if the mother is not infected then there is no way for the baby to get the bacteria in his eyes.  Also, any intervention to the mother-baby during this important bonding time must have very clear benefits that override the interference.