A judge said the health secretary had "breached his legal obligation" by not publishing details within 30 days of contracts being signed.
The public had a right to know where the "vast" amounts spent had gone and how contracts were awarded, he added.
The government said it fully recognised the "importance of transparency".
But Labour claimed the government's awarding of contracts was "plagued by a lack of transparency, cronyism and waste".
The Department for Health and Social Care (DHSC) has struck deals worth hundreds of millions of pounds during the coronavirus pandemic.
Campaign group the Good Law Project and three MPs - Labour's Debbie Abrahams, Green Caroline Lucas and Lib Dem Layla Moran - took legal action against the department over its "wholesale failure" to disclose details of the contracts agreed.
Under the law, the government is required to publish a "contract award notice" within 30 days of the awarding any contracts for public goods or services worth more than £120,000.
The Good Law Project also claimed that the government breached its own transparency policy, which requires the publication of details of public contracts worth more than £10,000.
In his ruling, Mr Justice Chamberlain said: "There is now no dispute that, in a substantial number of cases, the secretary of state breached his legal obligation to publish contract award notices within 30 days of the award of contracts.
"There is also no dispute that the secretary of state failed to publish redacted contracts in accordance with the transparency policy."
The judge said the health secretary had spent "vast quantities" of public money on Covid-related goods and services during 2020.
"The public were entitled see who this money was going to, what it was being spent on and how the relevant contracts were awarded," he added.
He said this was important so that competitors of those awarded contracts could understand whether the obligations had been breached.
The judge also said publishing the details allowed bodies such as the National Audit Office, as well as Parliament and the public, to "scrutinise and ask questions about this expenditure".
Mr Justice Chamberlain acknowledged that the situation faced by the DHSC during the first few months of the pandemic had been "unprecedented".
He said it was "understandable that attention was focused on procuring what was thought necessary to save lives".
But he added that the DHSC's "historic failure" to publish details of contracts awarded during the pandemic was "an excuse, not a justification".
However, the judge dismissed the Good Law Project's argument that there had been a department-wide "policy of de-prioritising compliance" with the law and guidance.
"This judgement is a victory for all of us concerned with proper governance and proof of the power of litigation to hold government to account," the Good Law Project said in a statement.
"But there is still a long way to go before the government's house is in order."
The DHSC said the government had been "working tirelessly" to deliver what was needed to protect health and social care staff during the pandemic.
"This has often meant having to award contracts at speed to secure the vital supplies required to protect NHS workers and the public."
A spokeswoman added: "We fully recognise the importance of transparency in the award of public contracts and continue to publish information about contracts awarded as soon as possible."
For Labour, shadow Cabinet Office minister Rachel Reeves called the judgement "troubling and unsurprising, and a perfect example of how this government believes it is one rule for them another for the rest of us".
She added: "This government's contracting has been plagued by a lack of transparency, cronyism and waste and they must take urgent steps to address this now - by winding down emergency procurement, urgently releasing details of the VIP fast lane, and publishing all outstanding contracts by the end of the month."