Two main factors led the United States to enter World War I.
Firstly, Germany's use of submarine warfare.
Several American ships were sunk in March of 1917, leading to the assertion of war in April. The U.S. believed this type of warfare to be unconstitutional and monstrous. Also, it diminished American trade with Britain, which did not seem well for their economy.
Secondly, the Zimmermann Telegram.
In January of 1917, British intelligence would prevent the Zimmerman telegraph, a secret message system from Germany to Mexico. Moreover, Germany tried to convince Mexico to join the war in their favor, seeming like an alliance between Germany and Mexico. Germany also did this to keep the U.S. from coming over and being incapable of helping their Allies in Europe. Americans got upset because the Germans offered to give Mexico land that the U.S. had taken from them in the Mexican-American War.