As with any surgery, there are risks involved. With retinal surgery, there are two main risks; risk of blindness of infection and risk of blindness from retinal detachment.
Blindness may result from infection that develops inside the eye. The condition is called endophthalmitis and is one of the few, true, ocular emergencies. It is an extremely rare event and occurs less frequently than cataract surgery. I estimate in incidence of about 1:10,000.
Retinal detachment may occur as a result of any intraocular surgery, not just vitrectomy. A rough estimate is about a 1% of chance of developing a retinal detachment after retinal surgery.
Relative risks of surgery may include, but are not limited to; bleeding, advanced cataract formation, discomfort, increased myopia (in cases of scleral buckling), redness, light sensitivity, etc.