While we do not have great polling data that could tell us exactly how much various events caused American attitudes towards Germany to change, history books tend to say that the event that was most important in this regard was the sinking of the Lusitania on May 7, 1915. The Lusitania was a British liner that was sunk by a German U-Boat off Ireland. Among the more than 1100 passengers who died were 128 American citizens.
Americans were outraged by the killing of American citizens and by the German submarine warfare in general. Submarines were a new technology which did not conform to the traditional rules of war that required a warship to stop a suspect ship, inspect its cargo, and allow its crew and passengers to board lifeboats before the ship was sunk. This made them seem barbaric to some. Americans also felt that it was wrong for Germany to be sinking ships that had American passengers on them (even though the Lusitania was English and Germany had published warnings that British ships were liable to be sunk because of the war).
For these reasons, the sinking of the Lusitania is the event that did the most to turn Americans against Germany, even if the US did not join the war for a couple of years after that event.