Both have their specific areas of strength. In mobile equipment like construction, agriculture, and mining, hydraulics is the logical choice because of the force required and the mobile nature of the machinery. For automation applications, pneumatics is the logical choice.
As Josh points out in this article, the two forms of fluid power, pneumatics and hydraulics, are very similar in that they use many of the same types of components like valves and cylinders. The big difference is the medium meaning air for pneumatics and oil for hydraulics.
Thanks to Josh for this explanation for those who do not have that instant recall because of experience. It makes a lot of sense.