Apart from barbed wire fences, sandbags were about as weak a defense as could be imagined. Any sort of explosive weapon, including grenades, tank shells, rockets, all manners of missiles, and artillery could eliminate a pile of sandbags with ease. However, this was counterbalanced by the sandbag's trivial expense - a base could be ringed in sandbags for half the price it would take to put in sturdy concrete walls. However, it should also be noted that Sandbags could not block tank ordinance, so it was still a very weak defense.
Ironically, at times such a 'weakness' would turn out to be a strength. Sandbags could be used to keep troops and civilians from entering areas that they were not supposed to go to, whether because of traffic concerns (such as taking poorly-planned routes to resources) or of hazards. Sandbags continue to be an important element of the Allied arsenal, as they are a cheap, but effective stopping defense.
Sandbags also appear in Tiberian Sun and its expansion as part of the scenery on some skirmish maps, and as non-buildable defensive barrier in some single player missions.