There were many events that caused Americans to fear the spread of communism. The years that you mention were some of the most important years for such events.
In the sphere of international relations, there were some really big events in these years. There was the communist victory in the Chinese Civil War. The Soviet Union detonated an atomic bomb and then moved on to hydrogen bombs. The Korean War broke out. There was an insurgency against the French colonizers in Vietnam that was led by communists. Sputnik was launched. Fidel Castro overthrew the Batista dictatorship in Cuba and instituted a government that soon allied itself with Moscow. The Kennedy campaign excoriated Richard Nixon during the 1960 election for having helped the Soviets gain a “missile gap” over the US. The Soviet Union put missiles in Cuba in 1962. All of these events scared Americans and made them feel that the communists were gaining on them.
Domestically, there were issues as well. There were hearings about communists in Hollywood. Senator Joseph McCarthy alleged that there were communists all over the US government. Alger Hiss was convicted of perjury after being tried as a Soviet spy.
The events all helped to make Americans very concerned about communist advances.