The Sandbag Wall is a defensive structure which is inexpensive and provides trenches and Field HQs with decent protection from explosions. Sandbag walls can be a good addition to trenches or mortar pits if you want to give your guys better protection from explosions, but they aren't very good against bullets. You will hear a distinctive ricochet sound if a bullet hits the sandbags.
During World War II, sandbags were placed outside of buildings and near doorways to protect them from explosions and bullets. They could also be moved to quickly block an unprotected gap in a building or extinguish a fire. Sandbags were also used as extemporized "soft armor" on American tanks to help defend against German anti-tank rounds, but the tactic was probably ineffective.