There are many reasons and it's a pretty fascinating discussion. It was well debated for the two and a half years the war continued before the United States officially declared war.
The Germans had announced a return of unrestricted warfare in February 1917. It was decided that they had to stop all supplies and make the British and French suffer the way the Germans were hurting from the British blockade. The threat of American entry was presented to the Kaiser but it was dismissed.
At the time the Germans decided to re-enter unrestricted submarine warfare, the American army only had about 40,000 members. Many battles in the previous year so more than that in casualties to both sides in a single fight. The thinking was that the addition of unrestricted warfare combined with the knock out of the impending knockout of the Soviet Union and the new defensive strategy in the west would be enough to end the war before the Americans could sufficiently mobilize and arrive on the western front.
The British had intercepted the "Zimmerman Telegram" where the Germans had allegedly tried to coax Mexico in to invading the United States from the south to keep them busy. The Germans had also been busy sponsoring terrorism against industrial targets in the United States.
The telegram, unrestricted submarine warfare, industrial sabotage, and a feeling in America that the Allies would be the eventual winners helped win over Congress and Woodrow Wilson's request for declaration was approved on April 6, 1917.
As to how did we become a leading industrial nation afterwards. The United States was the big winner, economically, during the war. They were able to increase production and increase sales of war materials and general supplies to both the Allies and the Central Powers during the first 3 years of the war. Upon declaration of war, they were able to continue to profit.
The French, British, and Germans mobilized an extremely large percentage of their "able bodied" population that would otherwise be working in the factories. A lot of this population would return and there was no work after the war because of the massive debts and cost to the Allied and Central Powers' governments. The Americans did not assume as large a percentage of this debt because they were late to the war and upon entry used British and French materials that were paid for by the British and French. The British even offered to use the American bodies that would be coming as regular additions to their military under their command and equipped by the British. This was unacceptable, but we did allow them to equip us.
After the war, our factories were rolling, our population was still able bodied, and we were riding an economic high from all the European money input in to the economy during the war and the lack of war debt on the scale of the European powers. It helped us, combined with World War II, to move in to a position vacated by the Germans, British, and French.
Lots more to this. Just typing quick over coffee while my wife bugs me to get to the farmers market. Sorry I couldn't be more academic.
Two different questions here, I'll throw in my two cents on the first one, because I don't have a great answer to the second.
A complete answer to the first question question will necessarily have two parts: an analysis of an underlying cause as well as the identification of a triggering cause of America's entry into the War. The answers to what the underlying and triggering cause will be in this case will depend to a large extent on the theoretical leanings of the historian telling the story. I'm what is known as a Realist in terms of international relations theory, so my answer will come from that perspective.
The eminent theorist of International Relations John Mearsheimer, of the University of Chicago, argues in his 2001 book The Tragedy of Great Power Politics that the underlying cause of America's entry into WWI was the desire of President Wilson to prevent Germany from establishing a state of hegemony in Europe (hegemony is a situation where local great powers cannot militarily contain a greater power, known as a superpower). The United States spent over a century establishing hegemony in the Americas and supporting efforts to push European powers out of the Western Hemisphere so that it could ensure its own security by being surrounded by relatively weak neighbors. As Mearsheimer explains it, from 1850 until 1900 the United States gave hardly any thought to sending troops to fight in any European wars since it was clear that the balance of powers was very even and that an alliance of local great powers could contain any of their peers who tried to establish hegemony on the continent. The United States adopted a policy of "buck passing" -- in other words, relying on other states to accomplish its strategic objectives for it -- during this period (Mearsheimer, 252-253).
From 1900 to 1917 it became increasingly apparent that Germany was the most powerful state in the region and had a realistic chance of establishing hegemony in Europe (252). After war broke out in 1914, the United States relied on the Triple Entente nations of France, Russia, and the United Kingdom to contain Germany on it's behalf. Before 1917 the United States did not commit ground troops to the War but did provide the UK and France with substantial military and financial assistance, still in line with the buck passing strategy that it had relied on for decades (Ibid).
Events in Russia played a decisive role in triggering American entry into the conflict. During the War, Russia played a critical role in preventing a decisive German victory by providing an Eastern Front to the War. The Russian army, however, was repeatedly beaten badly by the Germans and the war became steadily more and more unpopular with the Russian public. By March of 1917, it was clear that the Russian army was on the verge of disintegration, and a revolution in March of that year (February under the old style Russian calendar) removed the Tsar from power. Given Russia's military weakness and internal political instability, it now appeared that the Eastern Front might close, allowing Germany to concentrate it's energy on the Western Front and a serious possibility at a decisive victory (Mearsheimer, 254). The United States could no longer pass the buck to other nations, and consequently entered the war in April of 1917 in order to prevent a decisive German victory.
To make a long story short, the underlying cause of America's entry into the war was fear of German hegemony in Europe, and the ultimate triggering cause was Russia's internal political instability.