Moving our population to Mars doesn’t make sense, especially since doing so will likely make Earth about as uninhabitable as the Red Planet. A smarter option is to move a breeding population to Mars (which has all of the non-biological resources needed for sustenance) and build adequate habitats for the population living here.
There are many threats to life on Earth, and humans are just one of them. Our planet could be hit by a stray comet or asteroid of sufficient size to create a firestorm followed by a devastating nuclear winter. Volcanic eruptions could make our atmosphere un-breathable for years. As our planet grows older, we are due for one last ice age and then the release of greenhouse gases from the oceans due to reduced circulation caused by the land-locking of all the continents. With the Sun growing hotter over time, Earth is due to eventually become much like present-day Venus: a hothouse on which nothing can survive.
A population on Mars would escape these local horrors, while being potentially subject to some of their own. But they would have time to develop the capability of moving people outward to other locations, perhaps including other solar systems. Starting such a population should be one of our top priorities as a species.