Here’s a fun paper that analyzes the radiation exposure of characters in The Martian. The TL;DR is that Mark Watney would have fared better than his crewmates in the Hermes.
Mars, with its thin atmosphere and lack of magnetosphere, doesn’t offer as much protection as Earth, but it’s better than nothing.
“We will have to live in domed cities and wearing spacesuits on Mars for a long time. But that’s not to say that we can’t have a really nice life. But it’s not gonna be an Earth life. It’s gonna be a Mars life.”
-John Grunsfeld, Associate Administator, former Astronaut, NASA
(From Nat Geo digital short “Finding Shelter on Mars”, http://channel.nationalgeographic.com/u/kcHFdMpA6aOk1uf9U–PNfETnzRnlxuRaqE-NlgZ_SbDUwaV2DA9Q8pdgmwf/)
Solar and cosmic radiation will keep us underground unless we come up with other ways to protect ourselves. Water, in liquid or solid form, is a good insulator from this radiation. But how to deploy it in a structure? Here are a couple of variations on the idea of an ice dome:
photo from Mars Ice House