Sonar is good if you have an unescorted merchant and you want an accurate distance for your fireing solution, but if there are escorts around they will hear the active sonar and come running.
The three best things you can invest in are
Better hydrophones- all the better to hear the world with
Radar detector- gives you more notice of incoming escorts and aircraft, but do keep an eye out, as it won't detect all of them!
Bold decoys- can make the difference in getting away from a pack of angery escorts!
Two other things are well worth getting
Snorkel- from 1944 onward, this needs to become standard fit if you wish to survive
Radar- Early sets aren't worth the investment due to limited arc of reading, wait for a later model with a better dection field and range. Be careful in it's use , as it can be detected by others at a greater range than it will be able to detect them.
Good Hunting