How did America convert from a peacetime economy to a wartime economy during World War I?
The US government did a number of things to help the American economy convert to a wartime economy. Overall, this was a conversion that was driven by the government rather than a simply voluntary one on the part of businesses.
The government created a number of wartime agencies that were meant to convert the economy to a wartime footing. For example, the Food Administration was created under the direction of future president Herbert Hoover. This agency got farmers to produce what was needed by offering high prices. It also encouraged people to cut back on their consumption of things like meat and wheat so as to leave more for the soldiers.
Another major agency was the War Industries Boards. This board took supplies requests from the US and other allied governments. It then decided which things were most important and had them made. It allocated the raw materials to various factories and told them what to produce.
Overall, then, this conversion was done by the government using a variety of boards that ended up getting businesses and people to do what was needed for the war effort.