World War I:
One reason the US joined WWI was because of its allies. The US was allies with Great Britain, France, etc, and the job of an ally is to help each other out. Also, the US was shipping goods over to Great Britain and the Germans caught them. As one of the boats sailed over to Great Britain, the German U-Boats sunk it, causing anger. This was the main reason the US joined the war - they were angry at the Germans for sinking a passenger ship.
World War II:
The US entered WWII when the Japanese bombed Pearl Harbor. Before that, they had stayed neutral, however, once US land was attacked and bombed, they decided it was not okay and they needed to join the fight. This was actually 2 years after the war had started. The reason Pearl Harbor was such a major bombing was because that was a huge naval base and it wiped out a lot of the American Navy.