In tank mode the siege tank is decent against large ground units and in groups, capable of dealing with medium and small units with ease. Arguably, it's still not as efficient as a group of marines, especially if a force is being moved by dropship (which can carry 2 tanks or 8 marines).
The siege tank is most useful in siege mode, fusing a powerful attack with the longest range of any ground unit in the game. In addition to supporting bunkers and defenses, two or more groups of tanks may advance using bounding overwatch; a group in siege mode covers the other group in tank-mode as they move forward to establish another fire base, from which the second group covers the advance of the first. The tank's siege mode range is greater than its sight range; supporting a tank with spotters is useful.
The Shock Cannon causes splash damage to all units but has a minimum range. Therefore, tanks in siege mode need other units to guard it (perhaps even other tanks in siege mode), although these guards might take damage from the shock cannon as well as the enemy. The guards can also screen for the tanks as they withdraw. Transforming between modes takes time, during which the tank is unable to move or attack which leaves it vulnerable to fast units like zealots.
Some players prefer to "wall-in" their siege tanks, by erecting buildings to surround the tank, thereby preventing the enemy from getting closer than the minimum range of the shock cannon.
A Missle Turret, marine-filled bunker, and siege mode tank cluster may provide defense against ground targets at long and short ranges, and air targets. This is incredibly effective against the zerg due to their use of overwhelming numbers. Siege Mode is not as effective against the protoss: zealots with the Leg Enhancement upgrade will spend less time in the Shock Cannon kill-zone and reach the bunkers faster. Zerg can likewise overcome a siege tank line if their units are dropped in via overlords, right in the siege tanks' killzone. This risk can still be mitigated even beyond structures if the siege tanks are accompanied by marines, goliaths, wraiths, firebats, and SCVs.
This greatly increases the damage and range of the siege tank's attacks, and gives them splash damage, but prevents the tank from moving. In siege mode, the siege tank has a minimum range it cannot attack within.