Methylammonium lead halide perovskites are attracting intense interest as promising materials for next-generation solar cells, but serious issues related to long-term stability need to be addressed. Perovskite films based on CH3NH3PbI3 undergo rapid degradation when exposed to oxygen and light. Here, we report mechanistic insights into this oxygen-induced photodegradation from a range of experimental and computational techniques. We find fast oxygen diffusion into CH3NH3PbI3 films is accompanied by photo-induced formation of highly reactive superoxide species. Perovskite films composed of small crystallites show higher yields of superoxide and lower stability. Ab initio simulations indicate that iodide vacancies are the preferred sites in mediating the photo-induced formation of superoxide species from oxygen. Thin-film passivation with iodide salts is shown to enhance film and device stability. The understanding of degradation phenomena gained from this study is important for the future design and optimization of stable perovskite solar cells.