They are good for intelligence gathering and observing, as they can enter other borders (like caravels) without penalty. They can carry spys.
They are also useful for pillaging.
They can easily kill transports.
They start with a 50% withdraw chance if they are losing the battle; give them Flanking I and II, and they have an 80% withdraw chance. Hit a battleship with a sub first, and the sub will likely survive (withdraw) after damaging the battleship, then a destroyer can finish off the battleship. Or use the sub to wound an enemy battleship or destroyer before they can hit your carrier or transport, to protect your convoy. Your sub withdraws, to fight another day. Use them for hit-and-run tactics.
Are they the best naval units? No. But with a high withdraw chance, they can be very useful if you use them right.