Mr Justice Brooke said that in framing the 1990 Broadcasting Act, which lays down the commission's remit, Parliament had never intended the watchdog to entertain complaints from pressure groups not directly involved in a programme.
The programme provoked a furore in September 1993 when it reported that single women were deliberately getting pregnant in order to leapfrog council house waiting lists. After protests by the National Council for One Parent Families, the commission ruled that in being selective with facts the programme had misrepresented Britain's 1.3m lone parents.
Although the BBC broadcast an apology, it took the unprecedented step of accompanying it with a strongly worded rebuttal of the commission's findings, as well as pledging to seek judicial review of the decision to entertain the complaint. The BBC said there had been no complaints of unfair treatment by individuals in the programme.
Mr Justice Brooke said the commission should never have entertained the complaint because the charity did not have a "direct interest" in the programme. He gave the commission permission to appeal because of the public importance of his ruling.
He added that if programme makers handling controversial issues "are constrained to take into account not only issues of fairness and justice to individual people or organisations but issues of fairness and justice to a large, amorphous population of people perhaps numbered in hundreds of thousands, then it is apparent that the public interest is likely to suffer if they feel constrained to play safe".
Glenwyn Benson, former editor of Panorama,said: "I think broadcast journalists will be relieved." She had told the court the implication of the commission's ruling for Panorama journalists was "crystal clear: steer very clear of politically incorrect themes which have high political salience and are the province of a single-issue lobby group".
The BBC said the commission had been set up to give redress to those "who themselves feel they've been unfairly treated in a programme. It was not meant to be a platform for pressure groups."
The National Council for One Parent Families said the court had created confusion over "how vulnerable groups can bring complaints against powerful broadcasters who misrepresent them and their concerns". Sue Slipman, the charity's director, said the court's "technical" decision had not questioned the commission's findings, merely its competence to entertain the complaint.
Yesterday's decision contradicts a High Court ruling against Channel 4 before Christmas. Its legal series The Brief reported on racial abuse in a Derbyshire village. The court ruled that the commission was right consider a complaint from a local parish council which claimed to speak for the community.