Yes, as one way to control cameras on top of masts. Replacing periscopes.
Not really a comparable to actually steering the boat.
Here’s a video from a submarine tour where you can see the Xbox controller in action: https://youtu.be/0StWrXoN8nI?si=Hf5eoGOU-jxDNa2x
(Edit: added link to video)