How did the events in WWII set the stage for the Cold War between the U.S. and U.S.S.R?
A common enemy in Nazi Germany temporarily united the United States and the Soviet Union, but the relationship started out strained and ended strained. Prior to the war, many in the United States looked askance at the communist colossus taking shape in Russia and throughout the Russian Empire. The Stalinist purges and mass atrocities of Stalin's collectivization campaign, especially in the Ukraine, thoroughly validated those concerns in the West, but the scale of the threat from Hitler's Germany was sufficient to force the two countries to put aside their differences, if only temporarily, in the interest of defeating the Axis powers. While the Soviet Union and the United States worked together to defeat Germany (and later Japan), there remained enormous mistrust between the two countries. The agreements negotiated at Yalta (February 1945) and Potsdam (July 1945) cemented the division of Europe that would form the border between East and West for the duration of the Cold War, but the territorial divisions agreed to at those historic conferences were a manifestation of the Cold War environment that already existed, not the cause of the Cold War. With the defeat of Germany and Japan, the United States and the Soviet Union returned to their prewar posture of mutual mistrust and hostility -- a situation dating to the Bolshevik Revolution of 1917.
The events of WWII set up the Cold War by splitting up the world into communist and non-communist areas.
At the Yalta Conference, the Allies had agreed (more or less) about how to split up Europe. The Soviets would be given control of Eastern Europe (though they were supposed to allow elections). Western Europe would not be under Soviet control. Germany would be split between the four main allies.
Also at Yalta, the Soviets agreed to enter the war against Japan after Germany surrendered. They did this late in the war. This was significant because they were able to push far enough into Japanese-held Korea that the country was split in two after the war, with the northern part becoming communist.
These territorial splits were the main way in which the events of WWII helped lead to the Cold War.
WWII set the stage for the Cold War between America and the Soviet Union in several ways. One way was the Soviet occupation of Eastern Europe. At Yalta, Roosevelt only talked about free elections for Poland, but he did not give a timetable for this, with the idea that getting Soviet help to fight the Japanese later in the summer was the main objective. Roosevelt died before he could negotiate with Stalin, so Eastern Europe would remain occupied for the next forty years with Soviet puppet regimes. Another piece of distrust was the manner with which America dropped the atomic bomb. When Roosevelt died, Soviet leadership probably knew more about the American nuclear program than Harry Truman did due to their spying. Stalin expected to be kept informed on the program, but Truman only alluded to it whenever he talked to Soviet Foreign Minister Molotov. America and the Soviet Union shared the occupation duties of Germany after the war, but the Soviet Union did not get a chance to occupy Japan, much to Stalin's anger.
What was more important than the diplomatic frostiness between America and the Soviet Union was the disparity of strength between the two powers. WWII bled the Soviet Union considerably more than any other nation. Stalin accused the Allies of being slow to open a second European front in the war in order to further weaken the Soviet Union. After the war America had the strongest navy, air force, and army in the world, and had an atomic bomb also. Stalin had to show strength in order not to be perceived as weak to his Politburo back home and to hopefully scare the West into not going to war with the Soviet Union.