Typically, popeye in one eye means an injury has occurred and the eye is swelling. You can sometimes relieve the swelling by dosing Epsom salt (reef safe) @ 1 tablespoon per 5 gals. If this doesn't help after a second dosage, then your only option is to treat with antibiotics.
Popeye
in both eyes usually denotes a bacterial infection. Erythromycin is the antibiotic of choice for dealing with eye infections, and you can also add minocycline or tetracycline to this to widen the spectrum. Kanaplex and/or Furan-2 would be acceptable alternatives for the erythromycin/minocycline combo.
Cloudy eye(s) can mean either a bacterial infection or possibly flukes (see pic a bottom).
For all of the above, poor water quality would likely exacerbate symptoms.