Although it's not exactly a new idea, discussions of space settlements as a way to "back up civilization" seem to be popping up all over. NYU chemistry professor Robert Shapiro summarizes the argument briefly and eloquently in his essay "Why the Moon? Human survival!" in today's Space Review. He poses it as fairly simple risk management - if you spend a small percentage of your home's value each year to insure it, you are taking a precaution against the statistically unlikely event that it will be destroyed by fire or other causes. It's not a large risk for any one house, but houses do burn down, and when they do, it's a large loss. Wouldn't it make similar sense to back up civilization's knowledge (and some of its citizens!) somewhere other than here? I think so.
Verner Vinge originated the idea (or at least the terminology) of the "technological singularity," but in an article on KurzweilAI.net, he asks "what if the singularity doesn't happen?" He then envisions several alternate scenarios. Interesting stuff, and while of course he doesn't know how things will really turn out (he leans toward the Singularity, naturally enough), he suggests that "Self-sufficient, off-Earth settlements [offer] humanity's best hope for long-term survival."
Another view of possible alternate futures is found in David Brin's article "Singularities and Nightmares" which is found on the Lifeboat Foundation's web site. Of course the Lifeboat Foundation is dedicated to helping humanity survive existential risks, of which there are all too many. LF's multi-layered protection programs extend from the very small (NanoShield) to Space Habitats and AsteroidShield. Good to know someone is working on the backup plan, but if you're an existential risk hypochondriac, you might want to steer clear of the LF web site. It will definitely give you ideas.
For the full treatment of the role that space can play in Earth's survival, it's hard to beat William Burrows' 2006 book The Survival Imperative: Using Space to Protect Earth. He describes past disasters and outlines the prospects for future disasters of many kinds, and suggests as other writers have that the role of NASA and Earth's other space organizations should be clear: to learn to prevent what disasters we can (such as deflecting certain asteroids), and to prepare the way for space settlements where human knowledge and life may survive whatever disasters (natural or self inflicted) may befall us.
Whether the chances of humanity's survival in the next hundred years are 50% at best (as Sir Martin Rees suggests in his 2004 book Our Final Hour) or somewhat better than that, we clearly face a lot of risks. We should continue to work for world peace, environmental protection, and sustainability (this is still the best planet we've got, after all), but it's clear that all of our eggs are in one basket right now, and that basket doesn't seem as big as it once did. I think we better go for the Moon, learn to round up some asteroids, and build a nice little summer place on Mars before it's too late.