What causes eye pain and seeing halos around lights?

Possibly glaucoma. Blurry vision, red eye, eye pain and haloes around lights could be a sign of corneal edema secondary to acute elevation of intraocular pressure.
Dryness/glaucoma. Mild to moderate chronic eye pain with occasional haloes is usually dry eye and should resolve with drops. Acute, severe eye pain and redness may represent angle-closure glaucoma. Sometimes inflammation or corneal hazing may cause haloes as well. Best to get checked out soon!