Well, if the Earth really gets that bad (e.g. the entire surface is all water, no land; or extremely destructive weather events; or too dark because sunlight can't reach our surface), it might actually be easier to set up self-contained (bubble) cities on another planet than on earth itself.
But if you're talking about terraforming, then if we could terraform another planet we could probably re-terraform earth itself.