The Viking is a very versatile unit, it can freely transform into either an Air Superiority Fighter or Ground Assault unit.
Countering the Viking will prove problematic; only a select few units are capable of providing an effective counter. Marines will prove effective en masse, due to their ability to attack ground and air. The Protoss Phoenix will also fulfill a good counter, being able to deliver very strong Anti-Air attack while being able to lift them from the ground with the Graviton Beam ability. Hydralisks will counter them for Zerg, though Spore Crawlers and Spine Crawlers will prove effective, especially since they can now move and relocate.
The Brood War revealed critical weaknesses in terran anti-air capability. The new Wraith combat fighters and Valkyrie missile frigates proved to be an unwieldy combination against agile zerg airborne organisms. Ground-based anti-air support from goliath assault walkers was too limited in its mobility: all too often airborne attackers would simply move out of the goliath's range and find less well-defended targets to destroy.
In the aftermath of the war, terran weapon technicians proposed a radical new concept to resolve both of these problems. Based heavily on the transformation design of the terran siege tank, the viking was designed to be the ultimate anti-air and ground-support weapon system. With the ability to change its combat role from an assault walker to an air-superiority fighter, the viking can switch smoothly to fulfill tactical needs in a developing battle.
The high mobility of the viking has also led to its expanding beyond the limitations of ground support. Full-scale raids by viking squadrons can inflict devastating damage and are very problematic to counter. In order to defeat vikings, the enemy needs to bring a strong ground and air force to bear.
Terrans have had difficulty finding pilots who can master both combat modes. Typically viking pilots are killed quickly in their first fight as they struggle to handle this complex machine. If they are talented enough to survive, they will last for hundreds of battles, becoming the ultimate terran aces.