The Snark is a robotic war ship the can be built at the Shipyard after you build a Munitions Lab to level 5. It can be sent to an enemy planet to damage their buildings.
Snark attacks are not random; they target the strongest building. Strongest is determined by building efficiency, but it has not yet been determined what other factors may impact target selection.
Per Change 2.4501: Snarks will now select a random building from the list of least damaged buildings.
There are also Snark II and Snark III.
These upgraded versions have a splash damage radius of 1 and 2 respectively. A splash damage radius of 1 means that the buildings directly adjacent to the damaged buildings will be hit as well. And 2 means those adjacent, and those adjacent to the first set of adjacent buildings. Here's an example damage pattern from Snark II: