What factor served as the basis for the United States' determination of whether it would support or oppose a country and its government during the 1950s?
During the 1950s, this most important indicator of how the United States viewed another country revolved around that country's position with respect to communism and the Soviet Union. Even before the Second World War was over—in fact, well before the war ended—tensions between the United States and the Soviet Union were rising.
The Cold War could logically be considered to have begun with the rise of the Bolsheviks in Russia during the revolutionary period of 1917 to 1922. The consolidation in Russia of the Bolsheviks' hold on power was perceived as innately threatening to the capitalist nations of the West, and for good reason given the rhetoric and ideological underpinnings of the communist movement. The military interventions by Western nations in Russia, especially in the far north and east of that vast country, were ineffectual in preventing a Bolshevik victory in the Russian Civil War, but their mere presence became a lightning rod for the communists. Communist movements in Eastern, Central and Western Europe, in the meantime, supported politically and financially from Moscow, sought to subvert the "westward" orientation of those countries' governments. The two sides were allied in the face of a common enemy, Nazi Germany and its Axis allies, but the relationship was always strained and sometimes outright hostile. The Soviet Union in particular wasted no time maneuvering for post-war advantage as soon as the tide had turned against Germany and Japan, and the arrangements agreed to at Yalta and Potsdam solidified the split of the Eurasian continent between "East" and "West," with Washington and Moscow serving as the respective centers of the competing blocs.
With the end of the war against Germany and Japan, the Cold War resumed with a vengeance, and the United States predicated its position relative to individual countries upon those countries' stance on communism. Governments hostile to communism became friends, and those aligned with the Soviet Bloc and with the People's Republic of China were viewed as hostile. The fact that served as the basis for the United States' determination of whether it would support or oppose a country and its government during the 1950s, then, was the latter's political orientation with respect to the stand-off between capitalist (and, generally, democratic) nations one side and communist or socialist (and, generally, nondemocratic) nations on the other side.
Kipling's answer is largely correct as long as you have an understanding of the word "communist."
As in all nation-states, the government does not represent the national interest. Governments represents the interests of domestic power. Those who hold power inside the country will exercise that power in a way that will be reflected in government policy. This being the case, and understanding that domestic power largely lies in the hands of those who own the country and control the economic system, it should come as no surprise that those who were called "communists" were those looking for economic and political independence. In short, the "communists" that the "United States" found threatening were those who wanted independence and democracy.
In other words, the 1950s as well as every other decade, the US government supported foreign governments that supported US domestic power interests and opposed those that did not support those interests. This is true for how the US government behaves - as well as every other government. There is no American exceptionalism and the world is easier to understand if you understand that our nation-state is like all others.
The student need not concur with my answer to her question, but ebeaver10's response seems inadequate. Take it for what it's worth. Communism left a trail of literally tens of millions of dead bodies each in Russia and China alone, with more than a million Cambodians murdered by the Khmer Rouge between 1975 and 1979. While American foreign policy was certainly not without its failings -- some quite serious -- the suggestion that U.S. policies were driven solely or even primarily by domestic commercial interests is not only factually wrong but morally repugnant. The Cold War was a confrontation between the totalitarian systems imposed across Eastern Europe and much of Asia on one side and the liberal democracies prevalent across the West. West Germany was very different from East Germany.