If it's just one eye it's probably an injury. Can treat in the display with plain USP epsom salts. 1 tablespoon per 5 gallons of tank water. Can redose once.
If it's both eyes it's probably an infection. Can treat in a QT with erythromycin. It's the best for treating eye infections.
Are those white spots on your fish? Or the glass? Looks like it might have Ich.