A federal judge said yesterday he will allow the District of Columbia to improve its prisons at Lorton in Fairfax County rather than shut them down by 1980 as county officials had wanted.

U. S. District Judge Albert V. Bryan Jr. said at a hearing in his court in Alexandria that the plans submitted by D. C. represent "good faith" effort and are "more than nust cosmetic," contrary to complaints made by Fairfax County.

Under those plans, a $400,000 electronic surveillance system was installed last November, and since then there has been on escape from the medium security facility it covers.The plans also call for additional improvements costing $13.8 million to the undertaken as soon as Congress approves the money.

County officials have complained about Lorton for many years, saying that county residents are in constant fear of escapes, that the Lorton facilities pollute the air and water and that it is unjust to have a prison outside the jurisdiction that operates it.

Yesterday's hearing was in a suit filed two years ago by the county against District corrections officials. Judge Bryan ruled in the suit last July that the prison is a "public nuisance" and ordered the submission of improvement plans by the city and allowed county officials to respond to the District's proposal by proposing their own solution - closing the facilities.

Although the judge indicated satisfaction with most of the city's plans, he said they are different in two areas.

He questioned the adequacy of the city's efforts to stop water pollution from the penal facilities - the city reported that it has hired a consultant and was awaiting developments from a meeting yesterday of the Virginia State Water Control Board. He also questioned the adequacy of plans to notify Fairfax County authorities about escapes or suspected escapes.

Bryan ordered the city's lawyers to report back by July 1 with specific plans for solving those problems.

The judge said he will keep jurisdiction in the case and expects the city to produce progress reports within three months on improvements that the city's attorneys said are "on the drawing board."

"I don't want to let you off the hook entirely," Judge Bryan told assistant D. C. Corporation Counsel John H. Suda. "I expect that things on the drawing board will be concluded and will not remain on the drawing board."

Delbert C. Jackson, director of the D. C. Department of Corrections, said yesterday he is "extremely pleased" with Judge Bryan's decision.

"I anticipated the ruling," Jackson said. "It's axiomatic - you can't argue with success." He said he belives his department had had success in prison management, security and other programs.

Fairfax County Board Chairman John F. Herrity said he personally did not expect the judge to order the prison closed by the end of 1980, but he said he had hoped Bryant would appoint someone from the Bureau of Prisons to analyze the problems at Lorton.

"These improvements planned by the city will help the facilities, but they don't address management," Herrity said. He said he will recommend that the District be required to have all the proposed improvements accomplished or under contract within a year.

"We have to keep them under the gun," Herrity said. "That's the only reason escapes have dropped. D.C. never did anything voluntarily. The improvements that have been made came as a result of public pressure by the Board or court action by Fairfax County and the state. We've got to keep on top of it."

Among improvements that the city reported already have been made are a new lookout procedure, which went into effect last August, increased lighting, and provision of more hand friskers to detect contraband. The $13.8 million being requested from Congress would finance major improvements to plumbing and electrical facilities, structures and improving sewage treatment.

Records show that from last July through early May, there were 19 escapes from the Lorton facilities. In the fiscal year that ended last July there were 45 escapes, and in the previous fiscal year 132. The Lorton facilities house about 2,300 inmates.

Fairfax County contended that the city's plan to improve Lorton consists of "historic window dressing with cosmetic changes suggested for some facilities." Julian Tepper, an attorney for the county, told Judge Bryan at yesterday's hearing that the plans "offer more of the same at a high cost."