After the Bakumatsu and the end of the Tokugawa Shogunate in 1867, the Meiji government came into power. From 1868 to 1912, was the Meiji Restoration, where the old emperor was given back power and Japan became the first Asian power to adopt the European model of government and military. From this point, Japan took advantage of the Industrial Revolution and with the help of it's American and Western allies, it began to industrialize it's economy. In 1878, the first electrical grids were set up and used in limited applications with help from America. So yes, the Americans taught the Japanese how to use electricity.