The US was at the time pursuing the policy of "containment". President Eisenhower likened the spread of communism to dominos; if one falls, a chain reaction occurs, and many more follow suit. Thus, to arrest the spread of communism, you have to prevent the first domino from falling.
In Vietnam, the US was actually doing this (albeit in a very limited fashion) before the first GI ever set foot there, during the First Indochina War. For the Vietnamese, immediately preceding the war with the US was a war with France. Vietnam had been a French colony since the 1800s (then more widely known in the West as French Indochina). During World War II, the Japanese conquered and occupied French Indochina. A young communist revolutionary, Ho Chi Minh (the same Ho Chi Minh that would later lead North Vietnam) formed the Viet Minh, an armed, independence movement that resisted the Japanese occupation and also sought Vietnamese independence from France.
After V-J Day, France attempted to regain control of its colony. The Vietnamese, however, were not very receptive to this, and the First Indochina War began. The US, aware that the Vietnamese independence movement was largely communist, supported France in a minor role during the war. Long story short, the French lost, and Vietnam was divided into halves, Korea-style. Elections were supposed to take place, and the country was supposed to be reunified, but of course, things broke down (again, Korea-style) and the US resolved to do what France could not; defeat the communists. Thus, the Vietnam War began.
Simple summary of the Vietnam War? There really isn't one. It is a complicated mess, that is steeped deeply in political BS and misconceptions from any angle. It is kind of a taboo topic still for Americans, and the need to be "politically correct" about it means information sometimes gets downplayed or omitted outright.
source: I am Vietnamese and I am familiar with the recent history of Glorious Motherland!