The Regulus missile was a (pilotless) aircraft launched from American submarines in the 1950s -- it in turn was a nuclear armed upgrade of the Hermes, which was a captured, and later copied, German buzz-bomb launched from a deck catapult.
As noted in another answer, the Japanese built a small number of very large submarines with a sealed hangar on the deck; each carried and could catapult launch (as I recall) three Zero or similar aircraft equipped with floats, which would land alongside and be hoisted back aboard. These subs never saw significant service, as Japan surrendered while the first was on it's first mission near South America.
Modern (nuclear) submarines are highly optimized for submerged operation, and aren't steady enough on the surface to launch and recover piloted aircraft even if modified to carry something like a Harrier or F-35, but there's no reason drones couldn't be launched (brought on deck through the escape trunk, deck hatch, or sail) and, in the case of hovering types, recovered while surfaced.