In a related case, the court ruled that this information did not have to be shared with Congress.
Mr Trump is the first president since Richard Nixon in the 1970s not to have made his tax returns public.
His lawyers had argued that he enjoys total immunity while in office and that Congress had no valid justification to seek the records.
Two Democrat-controlled House of Representatives committees and New York District Attorney Cyrus Vance - also a Democrat - had demanded several years' worth of Mr Trump's taxes in order to determine whether current conflict-of-interest laws on a US president were tough enough.
Mr Trump, a Republican, denies wrongdoing and has called the investigation into his tax affairs a "witch hunt".
The two cases regarding Congressional committees were closely watched, as they could have had implications on how far US lawmakers can scrutinise the activities of a sitting president.
In the case regarding the request from the New York prosecutors, the Supreme Court ruled by a majority of seven to two that the president did not have absolute immunity from criminal investigation.
"Two hundred years ago, a great jurist of our Court established that no citizen, not even the President, is categorically above the common duty to produce evidence when called upon in a criminal proceeding," the court said.
"We reaffirm that principle today."
Ruling a political win for President Trump
Those wanting to see President Donald Trump's tax returns before the November presidential election shouldn't hold their breath.
In a series of high-stakes rulings on Thursday, the US Supreme Court swatted down the president's defense that, by dint of his high office, he is somehow above the law when it comes to state-level criminal subpoenas. That's good news for the president's critics, advocates of limited executive power, and New York prosecutors seeking to investigate Trump's personal finances.
The opinion is not-so-good news for anyone wanting a quick resolution to this case, however. Chief Justice John Roberts sent the lawsuit back down to the lower courts and offered a few new legal avenues for Mr Trump's lawyers to pursue that could continue to put off a day when the president's accounting firm ultimately hands over the documents. And if that day comes, there's still no guarantee that the request, by a secret grand jury, will ever lead to a public disclosure.
In the other case, involving a request by congressional Democrats for Trump's financial records, the court was even more circumspect. It simply punted the case down to the lower court with instructions to further balance presidential privileges with legislative power. The gears of justice will grind even more slowly there.
While legally these decisions may have been, at best, a draw for the president, by pushing the final day of reckoning further down the road, it's a political win.
What are the cases about?
Two of the cases centred on the ability of the House Intelligence, Oversight and Financial Services Committees to compel Deutsche Bank and Mazars USA, Mr Trump's longtime accounting firm, to turn over his tax and financial documents.
The case of Trump v Vance was based on on Manhattan District Attorney Cyrus Vance's criminal subpoena - an order to hand over evidence.
Mr Vance argued Mr Trump's documents were needed to determine if financial records had been doctored to cover up hush-money payments to two women in 2016 who say they had affairs with Mr Trump.
The judges heard the cases remotely because of the coronavirus pandemic. The Supreme Court has a 5-4 conservative majority and includes two Trump appointees - Neil Gorsuch and Brett Kavanaugh.