In discussions about submarine warfare in WWI and WWII it's often said that early in the war the British commanders were very worried that German submarines would significantly impact the overseas supply coming to Britain and bring Britain to her knees, and that the German should have focused more resources into their submarine fleet rather than their surface fleet.
Given what we know now, with perhaps access to the German archives, is such assessment accurate?
If the Germans did redirect resources to their submarine fleet, How likely would the German submarine fleet break through the countermeasures developed by the allies such as escorted convoys?
At their most successful, how much supply shortage and/or price spike in goods did the German submarines actually cause? Could Germany even have produced enough submarines to sink enough ships to significantly impact the supplies to the British Isles?
I can't speak to the U-boat campaign in World War I, nor can I answer some of your narrower questions about World War II. Broadly speaking though, the Kriegsmarine never came close to starving the British home islands or choking off its outside supply. The U-boat campaign was significant, and cost many lives on both sides. It should not be downplayed or dismissed. There were short periods both before and after the US entry into the war that Germany inflicted losses on shipping that might have been unsustainable, but the U-boats were unable to continue their attacks at that rate. The Allies began sinking U-boats at a much higher rate in 1943, ending the strategic threat of the U-boats (though the Battle of the Atlantic continued through the end of the war).
Many people believe that the German Navy was well-equipped and prepared to execute large-scale submarine warfare when World War II broke out in September 1939. It was not. Germany had begun its re-arming process and had started building submarines, but had only 57 operational U-boats when the war began. Of this figure, 26 were considered "ocean-going" U-boats capable of longer patrols into the Atlantic; the majority of the other 31 were built for short-range coastal patrols. A good rule of thumb for operational tempo for navies is that you can have about 1/3 of your force deployed at any one time. The other 2/3 will either be working up and training to prepare for a deployment, returning from a deployment, allowing men to rest, undergoing repairs and maintenance, etc. You can "surge" this 1/3 figure higher for periods if you need, but eventually you'll have to allow those subs to come back and refit. Clearly, 26 ocean-going submarines was completely inadequate.
My understanding of this is limited, but I believe Admiral Erich Raeder -- himself a surface officer -- had planned to build the Kriegsmarine into a much larger surface force over several years. He had planned for a war to break out much later, and knew that his surface forces were inadequate to challenge the Royal Navy in 1939. If Raeder had prioritized U-boat construction earlier in the 1930s, the situation might have been different. Germany also diverted some submarines to the Mediterranean in 1942 and 1943, and some have suggested that this prevented them from having a decisive advantage in the Atlantic. We'll never know for certain if the Mediterranean or prewar shipbuilding priorities were enough to change the outcome. I'm skeptical.
Karl Donitz, who took command of the U-boat force early in the war (and later the entire Kriegsmarine), had estimated that a force of about 300 U-boats would be needed to sustain about 100 U-boats deployed at all times and inflict sufficient losses on Atlantic shipping. Germany was clearly well short of that mark when the war began, but increased its submarine force rapidly. U-boats were much easier to build than battleships, of course, and Germany could no longer wait several years to have a fighting navy. By early 1941 there were real concerns from Britain about the cumulative losses of shipping. As the United States began to mobilize its shipyards and provide more aid, it became clear that the Germans couldn't sink ships fast enough. When the US fully joined the war late in 1941, the situation improved for the Allies even more. The worst year for shipping losses was actually 1942, when the Germans took advantage of American hubris, naivete, and unpreparedness. This is often referred to as the "Second Happy Time," when U-boats inflicted massive losses on Allied shipping with relatively modest casualties. Even with this, the Allies were still churning out ships and convoys could get through.
Germany finally had 100 U-boats deployed in August 1942 and (mostly) kept more than 100 at sea for about a year, peaking at more than 150 in parts of April and May of 1943. But these months were also when the Allies inflicted the heaviest casualties on the U-boat fleets; 42 U-boats were sunk in May 1943 alone. The U-boat threat never fully vanished, but by late 1943 it was clear that the tide had turned decisively in favor of the Allies. Not only could the Germans not sink Allied merchant ships fast enough, they were also losing U-boats faster than German shipyards could turn them out. The Allies were improving their ASW tactics, requiring more ships to travel in convoys, benefitting from codebreaking, and also pushing more escort vessels (including escort carriers) into the Atlantic. Attacking convoys was always a dicey proposition for U-boats; attacking ships defended by air cover was also risky. The combination of a ship traveling in a convoy and having air cover made it close to suicide to target for an attack.
The Germans calculated that they would need to sink at least 300,000 tons of shipping every month to eventually choke off the British supplies. That number was revised upward (significantly) to at least 600,000 tons of shipping per month (I've also seen 700,000 tons per month as the goal) after the US entry into the war. The U-boats hit the 300,000 figure in a few months and came close to it a few other months, but the requirement wasn't to hit that figure every once in a while -- it needed to be done every month. The shipping losses in 1942 were appalling, but still didn't sustain the figure necessary for Germany to be making the necessary headway. All the while, as the Germans fell short of their goals, the Allies were building ships faster and faster, and sinking more and more U-boats.
The American submarine campaign against Japan is discussed less often but probably came closer to inflicting the economic devastating that the Germans sought to inflict on the UK. The combination of American submarines, air attacks on Japanese shipping, and minelaying caused catastrophic damage to the Japanese economy (along with the strategic bombing campaign). The Japanese never had the shipbuilding capacity to replace their losses, devoted fewer warships to convoy escort duty, and required vast resources to be shipped in from other areas. American submarine captains by the end of the war reported frustration that they could no longer find targets worth using torpedoes on, sometimes using deck guns to sink sampans and other small vessels.
The Battle for the Atlantic did inflict serious casualties on Allied shipping and should not be understated, but the British economy never came close to collapse. Germany did not build and deploy U-boats in sufficient numbers to the Atlantic until too late, by which time Allied shipbuilding had mobilized and antisubmarine warfare tactics had improved to the point that U-boats could be sunk at a rate faster than the Germans could replace them.
In addition to the website linked above, here are some sources:
Torpedo Junction, by Homer Hickam (later of NASA/Rocket Boys fame)
Operation Drumbeat, by Michael Gannon
The Attack Submarine: A Study in Strategy, by Robert Kuenne is older but does an excellent job of looking at the submarine campaign from a big-picture view
The Effects of the World War II Submarine Campaigns of Germany and the United States: A Comparative Analysis, a 1994 Naval War College paper by G.H. Pearsall
"Black May"—The Tide Turns in the Battle of the Atlantic, by Samuel Cox of the Naval History and Heritage Center, describes what helped the Allies turn the tide in 1943 against German U-boats
You might find several other interesting sources to read here.