What I understand is that there are some particular radar wavelenghts that penetrate water just fine. Makes good images of the bottom. The first spacecraft to do this was a JPL scientific mission sometime in the late 70's, early 80's. Forget the name. Was mounted on an Agena body.
It was a non-classified mission, and the first images came out showing the ocean bottoms, and these long cigar shaped thingies floating between the surface and bottom.
Surprise, surprise, surprise.
The first images were relased, but someone quickly realized the national security component, and classified it quick.
The mission that fits your recollections is Seasat, but I hadn't heard that it imaged subs. The second link indicates that satellite detection of submarines underwater is impossible. But... anything that they do which causes a surface disturbance would be detectable.
Seasat
Hunting and Hiding in the Deep Blue Sea