The U.S could have prevented Pearl Harbor by either 1) remaining completely isolated from the War or 2) not having Hawaii be a part of the U.S. in the first place.
As I have mentioned in previous discussions, the U.S. was already involved in the war before they officially declared war against the Axis powers. Not only was the U.S. involved, but they picked a side. Through programs like the Lend-Lease scheme and by supporting Britain's blockade of the Atlantic as well as their use of civilians on ships to transport war materials, the U.S. clearly showed the world that they supported the Allied powers before 1941.
U.S. imperialism was shown during the creation of Hawaii as a U.S. state. In 1893, "American sugar planters overthrew the recently enthroned Queen Liliuokalani, a Hawaiian nationalist eager to rid the island of American influence" (Davidson 616). The U.S. government wouldn't have that, however, so they stood up for the elite planter group when a "contingent of U.S. marines arrived ashore on the pretext of protecting American lives" - though the country wouldn't become part of the U.S. until years later (Davidson 616). The planter class requested U.S. military aid because they didn't want to lose the profits they were making from the native Hawaiian people and their resources. In addition, they wanted to "avoid the McKinley Tariff's new tax on sugar imported into the United States" (Davidson 616).
I wonder what would have happened had the U.S. never supported the elite group of planters in Hawaii.
The U.S. policies before Pearl Harbor would have eventually led to increased U.S. action in World War II. The Pearl Harbor bombing was just a pretext that was used so that the U.S. could officially enter the war with American "support." The U.S would have capitalized on another attack if the Pearl Harbor bombing was prevented. In addition, the discovery of the Holocaust and the use of concentration camps (though we had our very own in the U.S. ) would have gained enough American support to increase U.S. involvement in the war. The U.S. would have gotten more involved regardless; their policies implemented before Pearl Harbor were just begging for further American involvement.
Davidson, James, Brian Delay, Christine Heyrman, Mark Lytle, and Michael Stoff, Nation of Nations: A Narrative History of the American Republic Volume II: Since 1865. New York: McGraw-Hill, 2008.