What you are asking about here was a central idea of the Cold War. This is the idea of the "domino theory." This was the idea that if a country (in this case Vietnam) became communist, then other countries near it would become communist. This would be the start of a chain reaction in which countries all over the world became communist.
Have you ever seen when someone sets up a line of dominos and then knocks one over and it makes the whole line fall down? This is what this theory is named after. The theory said that Vietnam would be like that first domino. If it fell (became communist) it would hit the next domino (country) and that country would become communist.
This theory was used to explain why it was important for the US to go to war in a country that seemingly had very little to do with the national security of the US.