Water is one of the most effective radiation shields we have for cosmic rays. NASA has contemplated using a water shield for Mars astronauts. There is a reason most fallout shelters are built under a pool when possible.
Nasa has also contemplated using human feces as shielding. The mixed use, dual purpose systems for spaceflight are a special case. What really matters is mass. Sand is cheaper than pool water.
Doing some quick searching, looks like there has been some research into what materials are better than others for shielding for cosmic rays. The couple minute look to me suggests there is more complexity than just mass, different materials have different properties, including at different energy levels for the cosmic rays. Although I suppose material cost and construction cost would also be a factor, where alot of sand might be easier to build a facility than the equivalent shielding in water. Although we're probably at the point where it's better to use something like a mine that is no longer used.