The uboat commanders handbook did label the uboat as a horrible gun platform and they are right! In the early war the gun was used to fire warning shots at merchants to get them to stop due to prize regulations. There were some commanders like Otto Kretchmer who was awesome at sinking ships with a deck very quickly, but he only attempted this in the dead of night! Outside of that, the handbook had specific ways to use the deck gun.
http://www.subsim.com/radioroom/showthread.php?t=219438