This question belies an essentially pre-WW1 mode of strategic thinking. People very much like the view of strategic conflict which boils down to a the capture of key assets and outposts. We want war to be chess -- capture the king and the game is won. That's how the great romantic stories of the Middle Ages shake out - great sieges and decisive battles - and it appeals to the narrative storyteller in all of us.
But it's not and it hasn't been that way for quite some time. To really get what makes modern conflict tick you have to understand what war is and by extension what its participants are.
War is conflict between states. The political scientists will probably want to fight about that but as historians such a rudimentary definition will serve us pretty well for another 10 years or so; it certainly works well in WW2. The participants, save the French resistance, are all pretty much major state actors. We know them well: the US, the USSR, Germany, Italy, Japan, the UK, etc but what matters for this discussion is that they're states.
Ok, what are states then? States are the political entities which can claim sovereign authority over their territory; to put it another way - states are the institutions that get to decide who lives and dies in a specific place. That ultimate authority over life and death allows the state to mobilize resources for war. It can put men under arms, tax, ration, and otherwise regulate the lives of every person within its territory. Because it can kill it can order men to their deaths and thus can make war. Indeed, we might go so far as to say that the capacity to make war is one of the defining characteristics of a state (but more on that latter).
Now traditionally a war is over when one "side" -- state or group of states -- decides that the cost of fighting exceeds the cost of not fighting. In, say, the Spanish-American War the cost of maintaining naval and land operations against the United States after defeats in both theaters of the war outstripped the importance of any demands made by the United States and the Spanish sued for peace.
But those costs are determined by what the winner can make them and what the political objectives of that winner are. Contrast the primarily colonial nature of the Spanish American war with the situation facing Japan during WW2. It is somewhat likely that American insistence on "unconditional surrender" prolonged the war with Japan as the US was demanding a very high cost for not fighting anymore. Indeed, the price of peace was the end of the political entity that constituted the government of Japan at the time. In a real sense, WW2 ended in the Pacific with the end of Japanese sovereignty and thus its status as a state. (It's not my intention to make this response about Japan's surrender; it's just an illustration. )^1
It is in this sense that WW2 was a "total war." There are lots of definitions of "total war" but I'm partial to the history of the phase as expressed by General Eric von Ludendorff and by Carl von Clausewitz before him. These men described the mobilization of the whole resources of the state against the whole resources of the enemy. Curtis LeMay, architect of the air campaign against Japan in the latter stages of WW2 would later describe his vision for total war in the nuclear age as "killing a nation."
Mobilization on such a level doesn't just mean a draft; though a draft is typical in a total war. Total war means resource requisitions, industrial appropriation, etc. It means that the entire productive capacity of the state is focused on the war effort and, in an age of air-power, that the entire productive capacity of the enemy is a target.
But such a condition is VERY hard to maintain. It requires the husbanding, not just of physical and human resources, but of political ones as well. War makes life on the homefront hard; it demands sacrifices not easily made and if the people do not believe in the worthiness of the cause they will chafe at the idea. Total war is therefore simultaneously a military and political struggle. As in World War I, World War II sees attempts to disrupt the fighting ability of the enemy both by physical means -- destroying factories, killing troops -- and by political/psychological means -- blockade, starvation, terror weapons.
During the First World War the Russians were defeated, not because the Germans took key strategic locations like St Petersburg or Moscow, but because their citizens were starving and they viewed the war as not worth the sacrifice any longer. Russia was defeated politically before she could be defeated militarily; the revolution that overthrew the Tsar and, later, the revolution that ousted Krensky and brought the Bolsheviks to power stemmed from the erosion of political will brought on by the strain of supporting the war effort. The end of the Great War in the East thus came with the destruction of one of the belligerent states.^2
While the mechanics of the war were different, World War II was much the same kind of conflict in terms of its totality. The capture of Moscow, while important from a psychological standpoint, would not have been sufficient te break the will of the Soviet government nor so decisive as to crush the capacity of the Soviet military to continue fighting. Therefore the fall of Moscow could only have ended the war in the East if it broke the will of the Soviet people to such an extent that they would risk revolt against Stalin rather than face Hitler's guns.
Assessing if that would have happened is hard and counterfactual as a historical question. As the fall of Moscow didn't happen we can only speculate as to what might have followed it and here we diverge from what we can safely call "history." What we can say with some certainty is that the Soviet government had communicated and committed to a policy of scorched-earth retreat. The movement of productive capacity beyond the Urals and the willingness to evacuate ahead of the advancing Germans formed the core of the Soviet commitment to long-term resistance to German occupation and would likely have provided some basis for an ongoing resistance.
Yes, Moscow was an important rail and telecommunications hub. Without it Soviet industry would have been severely hampered but as this map of World War II era Soviet rail lines shows, alternative routing around Moscow, while challenging, was not out of the question.
So would capturing Moscow have knocked the Soviets out of the war? Probably not. The Soviet government itself did not seem to regard it as a tipping point and while it's difficult to work out what civil unrest the fall of Moscow might have created elsewhere in the USSR, the Soviet government in 1942 was certainly on more stable ground than the Russian government in 1917.
Recommended Reading
Footnotes
Note that I am not saying that Japan ceased to be a place at the end of WW2. Rather I am suggesting that the institution of government which ruled Japan in 1944 effectively ceased to exist as a precondition to the close of hostilities. Just as the close of WW2 in Europe involved the systemic purge of the Nazi regime, the close in the Pacific purged the Japanese military clique. In so doing the political entity that controlled Japan prior to surrender was effectively killed - its power broken and turned over to its occupier.
Likewise the end of WW1 in the East came with the effective destruction of the Tsarist regime. While the USSR shared similar borders and a similar population to the Russian Empire that had come before it, politically it was a different institution. The necessary collapse of the Russian Empire came, not as a precondition for peace from Germany, but as a consequence of the Tsar's commitment to the conflict: the people reached their breaking point before the government and overthrew the government as a result.
Edits: Since someone gilded me I felt like I should clean up the prose here and address the rail line question that everyone seems to be asking. I hope this makes things clearer.
1940-1941 was really the period that Germany had the best chance of defeating the Soviet Union. But as history has it, an invasion within that window still failed to give them a victory. David Glantz have strongly argued that if Germany had attacked the USSR in 1937 (which was just before the Great Purge) or in 1942/3 (by which time the reforms that begun in late-1940 would have been completed), Germany would have been defeated outright.
Provided that Stalinism's pitiless determination to fight on at all cost remained rife in the USSR, there was absolutely no amount of revision to the German operational manoeuvres that could have made Operation Barbarossa a success. The USSR had the men, materiel and space to outfight Germany, provided they kept fighting. Besides, there was a constant influx of war supplies into the USSR from Britain, and later from the United States. Germany was toast the moment they opened the Eastern Front.
The fall of Moscow would have been a serious blow to Soviet morale. But given that the Soviets have already suffered several deafening blows and yet they still kept fighting, it becomes unlikely that the fall of Moscow would've made them give up.
The best operational summary concerning German options in late summer 1941 can be found in Weinberg's "A World at Arms" (IMHO the best single volume history of WWII):
"The Germans had to decide whether to resume the offensive on the Central front or in the south and north. The very fact that they could not repeat the earlier simultaneous offensives in all three sectors shows the weakening of German assault strength, or the lengthening of the front as one moves further east, and the obvious existence of continued Soviet resistance. ... If they pushed ahead in the center towards Moscow, they risked very serious dangers on the southern flank of such a thrust, dangers which they lacked reserve to meet. If they took advantage of the of the further advance in the center in order to cut in behind Soviet forces holding them back in the south, they would lose time on the central front.
The argument went forward at the time as vehemently as it has among historians since; the dispute in my judgment ignores the fact that the German assault on the Soviet Union had failed to obtain its objective and that at this point they could win further tactical successes on one or another of the front segments but they had already lost whatever chance they might theoretically have had to defeat the Soviet Union (a).
Furthermore, as careful analysis of the transportation system and supply problems has conclusively shown, the Germans were simply incapable of immediately resuming the offensive on the central portion of the front after they had reached the geographical limits of the truck supply system on which their initial advance had depended. Whatever they planned to do next, they first had to repair the railways so that these could bear the burden of logistical support for operations further east. (b)
(a) There is an interesting repetition here of the situation on the Western Front in the spring of 1918. Once the initial German offensive there had failed to win the war for them, they could strike additional blows - and did so - but had already lost whatever opportunity for victory they might have had.
(b) From the footnotes:
"This point is made absolutely clear by the very fine study of the problems of logistics which rendered any further German major advance on the central portion of the front impossible and in other ways doomed the German armies to delay and frustration ... In the papers of Field Marshal von Wreichs there are interesting letters which point out how very much wiser the Kiev operation was than any attack towards Moscow, which could not be reached in 1941 anyways and stating that von Rundstedt had been of the same opinion... Schuler's book shows that any operation on the Central front could not have been launched before late September, early October in any case."
So there you have it, the turn south to encircle the 600,000 Soviet defenders of Kiev and Uman was the correct operational decision in late summer 1941. Not having advanced as far beyond its Barbarossa starting point as AG Center, AG South could still be supplied by trucks. If the Germans wanted to keep the pressure on the Russians, turning PzA Guderian south behind Kiev was the only logical (indeed, the only possible) option open to the Germans. A direct drive on Moscow at this time appears to be a logistical fantasy.
Military amateurs talk about strategy, military professionals talk about logistics.
It's a little old, but I would recommend Alan Clark's Barbarossa: The Russian-German Conflict. You will find better context to answer your question. However, in short, even if Germany captured Moscow it is unlikely that would have had a significant effect on the outcome of the war.
The Russians had moved many of their factories deep into their territory, safely out of German hands. The real objective for Germany was the Caucuses and the raw materials there. Effectively capturing that could have changed the direction (I don't know about the ultimate outcome) of the war.
Can't recommend Clark's book enough though.
Recalling from Timothy Snyder's Bloodlands, the objective of capturing Moscow (and no, they weren't 1 mile away from it, but they were dangerously close) was to strike a decisive blow for the the political collapse of the Soviet Union and essentially cleave the European part of it off for Nazi dominion. The plan was to dispense with all but a skeleton native Slavic population (to serve as slaves for new German settlers who would come to colonise the land) by either deportation or mass murder by starvation. All cities were to be essentially destroyed. The food gained through the colonisation of the European Soviet Union (especially in Ukraine) was to help create an essentially self-sufficient Germany which could fuel its war machine without dependence on trade with the Soviet Union, the British (who controlled the Suez Canal, and thus the gates to the resources of India and the East), or the United States.
Capturing Moscow was an essential part of that plan. The failure to capture Moscow would mean that the Germans would have to fight a far longer, harder, and more strenuous battle than their war plans had accounted for (or that Germany was capable of sustaining). They realised that if they could not take out Moscow and neutralise the Soviet Union, the overwhelming counteroffensive would inevitably come, and that Germany had, by January 1942, essentially failed in its objectives for the war. As Snyder argues, this was the trigger for the implementation of the Holocaust--the destruction of European Jewry by means of mass murder--along with the other state-implemented mass murders of the Second World War (specifically referring to the mass death of Soviet civilians through starvation). Since the Jews could not be deported to a belligerent Soviet Union that was still in the war, and because their other plan (deporting them to Madagascar) was precluded by British naval dominance, the only way they could rid Europe of Jews was to murder all of them. Further still, the Nazis began requisitioning essentially all of the food produced in Ukraine and Belarus to send back home, leaving slave workers pithy rations and anyone who was not capable of working to starve. Soldiers were told that any bite of food eaten by a Belarusian or Ukrainian was a bite taken out of the mouths of that soldier's family. This was, unfortunately, quite true. So comprehensive was the plundering of the occupied Soviet territories that German civilians didn't really even begin experiencing food shortages until 1944.
Baku and its oil fields were far more important.
The USSR got 90% of its oil from the Caucasus oil fields (Maikop, Grozny and especially Baku). Their loss (even if Germany lacked the means to extract and pipe the oil back for its own use) or destruction would have crippled the Red Army and Air Force. The Red Army would then have to fight on foot.
Logistical limits would have prevented a complete German victory and advance to the Urals, but a total lack of oil would have prevented any Soviet counter offensives - leaving Germany in control of the bulk of European Russia and the Soviets being forced to sue for peace, even if they held on to Moscow.
If I recall correctly from reading Glantz even the Germans were not sure about the importance for Moscow. You could argue that Moscow as the target of Operation Typhoon was chosen because the lack of strategic options. This follows when you look at the German decisions following June 41. The German planning was:
Unternehmen Barbarossa: Destroy the Soviet forces at the borders ("Kick in the door and the whole Building will come down")
Since the Soviet Union kept on fighting the German High Command was arguing if they should keep on pushing towards Moscow or secure the Ukraine first. They did the latter.
The Soviets are still fighting so now the Germans focus on Moscow
What you can take from this is that if Germany believed in the importance of Moscow they would not have redirected Guderian's 2. Panzerarmee towards Kiev and weaken Heeresgruppe Mitte but kept on pushing towards Moscow.
Nonetheless i would argue that capturing Moscow would have been essential for having any chance to win the War in the east. But the capture in itself would not have ended the war.