This is usually due to bacteria on the eye. In my experience it's often caused by unsanitary conditions. If this is the case, it might be sufficient to clean the tank much more frequently. If it's not the case, you need to get antibiotic eye drops from the vet.