Ophthalmologists are trained to perform eye exams, diagnose and treat disease, prescribe medications and perform eye surgery. They also write prescriptions for eyeglasses and contact lenses.