They don't just patrol waiting to launch nuclear weapons though. Subs track other ships first and foremost, they have to for their own survival. And as has been pointed out previously in this thread, they can also tap cables as well as eavesdrop on radio transmissions. They can even use hydrophones to detect things like construction, mining, and even weapons testing.
>Intelligence, Surveillance, and Reconnaissance (ISR). Submarines provide the nation a crucial intelligence-gathering capability that cannot be replicated by other means. Operated with care and cunning and deploying multiple sensors, submarines can monitor happenings in the air, surface, or subsurface littoral battlespace, providing a complete picture of events across all intelligence disciplines. They are also an intelligence "force-multiplier," providing tip-offs of high interest events to other collection assets. Submarines are able to monitor underwater incidents and phenomena not detectable by any other sensor. Since they are able to conduct extended operations in areas inaccessible to other platforms or systems, submarines can intercept signals of critical importance for monitoring international developments. The unique look-angle provided by a submarine operating in the littoral region enables it to intercept high interest signal formats that are invisible to reconnaissance satellites or other collection platforms. Furthermore, the ability to dwell covertly for extended periods defeats efforts to evade or deceive collection by satellites and other sensors. The intelligence gleaned from submarine operations ranges from highly technical details of military platforms, command and control infrastructure, weapons systems and sensors to unique intelligence on potential adversaries' strategic and operational intentions. Our submarines can provide real time alertment to National Command Authorities on indications of imminent hostilities. And unlike other intelligence collection systems such as satellites or reconnaissance aircraft, submarines are full-fledged warfighting platforms carrying significant offensive firepower.
https://www.public.navy.mil/subfor/underseawarfaremagazine/I...
>Intelligence, Surveillance, and Reconnaissance (ISR). Submarines provide the nation a crucial intelligence-gathering capability that cannot be replicated by other means. Operated with care and cunning and deploying multiple sensors, submarines can monitor happenings in the air, surface, or subsurface littoral battlespace, providing a complete picture of events across all intelligence disciplines. They are also an intelligence "force-multiplier," providing tip-offs of high interest events to other collection assets. Submarines are able to monitor underwater incidents and phenomena not detectable by any other sensor. Since they are able to conduct extended operations in areas inaccessible to other platforms or systems, submarines can intercept signals of critical importance for monitoring international developments. The unique look-angle provided by a submarine operating in the littoral region enables it to intercept high interest signal formats that are invisible to reconnaissance satellites or other collection platforms. Furthermore, the ability to dwell covertly for extended periods defeats efforts to evade or deceive collection by satellites and other sensors. The intelligence gleaned from submarine operations ranges from highly technical details of military platforms, command and control infrastructure, weapons systems and sensors to unique intelligence on potential adversaries' strategic and operational intentions. Our submarines can provide real time alertment to National Command Authorities on indications of imminent hostilities. And unlike other intelligence collection systems such as satellites or reconnaissance aircraft, submarines are full-fledged warfighting platforms carrying significant offensive firepower.