They actually were not primarily interested in Japan as a trading partner, though there were profits to be made in that trade. The most immediate economic motivation for opening Japan was the American need for "coaling stations" and safe harbour in the Eastern Pacific. The European colonial powers had their own bases in Asia, and Japan was out beyond their ordinary trade routes. For the Americans, however, Japan was "on the way" to China. Since they were already trading with China, and whaling in the North Pacific near Japan, stopping in Japan to refuel and re-water was an attractive proposition.
W.G. Beasley writes that the British in the late 1840s/early 50s recognized that the United States was bound to open up Japan soon, so it was not worth their time or expense to seriously try themselves. Once Japan was open to trade, all parties including Britain could sidle in and see what profit and influence there was to make.
There were some Americans who fancied that Japan was fabulously rich in silver. Four hundred years earlier, in fact, Japan had supplied 30% of the world's silver, exporting mostly to China. But back in the sixteenth century, the Japanese silver mines were already drying up, while at the same time, silver was discovered in the New World. The incredibly rich Potosi mine in Bolivia became the source of silver in the world, and only small amounts of silver continued to be mined in Japan for internal use. Silver-hunters that came to Japan after trade had been fully opened were doomed to disapointment.
One non-economic reason for opening up a relationship with Japan was the treatment of foreign sailors who were shipwrecked in Japan. I recently wrote a reply with details of the incidents that helped bring about the Perry Expedition.
Once trade with Japan began, coal for steamers was one of the most important products. However, the big surprise Japanese money-maker was silk. In 1860, only a few years after trade had began, there was a silk worm blight in Europe that destroyed the French and Itlalian silk industries. Japanese and Chinese silk moved into the void in the market. In Japan, silk farmers and merchants were some of the first people to see benefits from this new relationship with the global economy.
Last but not least, the Western powers were not motivated by Japan's gold resources, but they did in fact force Japan into a situation where Western traders depleted Japan of its gold. Traditionally, the Japanese exchange rate between gold and silver was 1:5. The worldwide exchange rate was about 1:15. (To make things even more unequal, the Japanese "silver" coinage was not pure silver.)
Western diplomats forced Japan by trade agreement to accept Western silver at par (by weight) with Japanese "silver" coins. Western traders realized that if they exchanged silver for Japanese gold, then sold the gold abroad, they could make 200% profits. In 1860, these merchants basically looted Japan of 4 million ryos of gold, destroying the Japanese currency, and causing economic disaster and inflation.