If you find a lone destoryer crossing your path going at least 14 knots and you have the torpedoes to spare. Then give her a shot. At that speed and higher their detection ability is not good, so you can get somewhat close without being detected. I would also recommend a stern shot so you can be moving away as the torpedo heads toward you target. You'll need the extra distance if you miss.
If more than one avoid them. Hunter killer groups later in the war, don't mess with them either. usually at least 4 escorts , plus planes from the carrier to deal with.