Can I use peroxide for an eye infection?

Absolutely not! No! peroxide will cause severe and painful burning of the cornea, and will be only mildly annoying to the bacteria. Do not use it in your eye!
No. Definitely not-- will cause a corneal burn, plus corneal haze if induces an alkali burn: very painful, and if damages the limbal stem cells, then can cause corneal failure.