The Earth’s magnetic field protects us from most cosmic and solar radiation, by the Van Allen belts which they generate. Outside these, protection is needed, otherwise the levels of exposure are dangerous.
O’Neill thought that a 2 metre depth of lunar regolith, as soil, would be sufficient to protect from radiation. He was wrong, regolith is pretty useless for radiation shielding. Metals like steel and aluminium are not much better. That is because they contain heavier elements which re-emit powerful charged particles when they absorb cosmic radiation. What is needed is lighter elements, which absorb without re-emission, preferably a high content of hydrogen.
A good candidate is water (which is why spent nuclear fuel rods are immersed in it). The other contributor is not to make the habitat shell in metal, but in a high hydrogen content plastic. Polythene is perfect, not strong enough in its normal form, but NASA is developing a cross linked variant called RXF1 which is as strong as steel , and there are variants like this already available. That brings other problems: the outside temperature of a habitat would be over 100C in sunlight (enough to melt the material) and below -100 in shade (which would cause embrittlement). Also abrasion from micrometeorites could be worse than with a metal skin. It may be what is needed is an outer shell in steel (coated on the inside to prevent corrosion), then a layer of water, then an inner skin in plastic.
In low Earth orbit, within the Van Allen belts, little protection is required, a metre or less of water jacket and plastic.
In deep space, fully exposed to the solar wind and cosmic flux, however, it is another matter. This paper suggests that 7 tons per square metre of water/plastic shielding is required in deep space. This is many times the mass of a habitat and would make its construction economically (and possibly technically) unviable.
Fortunately there is a way round this - the possibility of creating a magnetic field around a habitat, a miniature version of the Van Allen belts.
If we are to create habitats in deep space, it is essential to resolve this, otherwise one is restricted to LEO. However, the prospects are promising, as the technology of superconducting magnets has advanced considerably, and without it a safe mission to Mars seems impossible.
Of course one could avoid the problem by putting habitats in LEO. It also makes it much easier to get to them. Indeed it might the best site for early habitats. However space in Low Earth Orbit is already getting crowded, especially in the ideal orbits around the Equator, so it limits the potential for expansion. Also habitats in LEO will tend to slowly spiral back towards Earth. To push them back would require enormous effort for large habitat - and the larger the habitat, the more stable the ecosystem, and the more diverse and interesting both human life and nature will tend to be.
Gerard O’Neill’s Big Idea
Meteorites – And Security