In Universe explanation
(as others have pointed out), the main cause in the movie was the Blight. It was killing food crops and all oxygen producing organisms in general.
Other issues mentioned obliquely and can be inferred to have contributed:
- Climate change (warming and drying)
- At least one major or multiple smaller regional wars
- Over population
- Rampant consumerism
Out of Universe explanation
The movie was about adventure and exploration. Space travel is terribly expensive. The script writers wanted to put forward some possible rational for paying for such a costly endeavor. Survival of the species is a pretty good reason, IMO.
To that end they didn't much care about the details of the Blight (and didn't provide us with any). They just wanted something ultimately deadly to humanity, that wasn't actually killing people at the moment & plausiblethat provided a reason to drive us off the planet.