Conjunctivitis may be caused by a viral or bacterial infection. It can also occur due to an allergic reaction to irritants in the air like pollen and smoke, chlorine in swimming pools, and ingredients in cosmetics or other products that come in contact with the eyes. Sexually transmitted diseases like Chlamydia and gonorrhea are less common causes of conjunctivitis.