In Starcraft 1 I vaguely remember that burrowed units wouldn't take splash damage (but would take damage from Psi-Storm), and units under dark swam did take splash damage, but you could avoid this by being burrowed.
In StarCraft 2 I haven't seen any information on if there are any differences between a burrowed and un-burrowed unit other than the visibility. Do burrowed units in SC2 take splash damage as normal? Does this depend on if they are detected or not? How about Glaive-worm bounces off a non-burrowed unit?