A federal judge in New Jersey surprised the Justice Department and American Telephone & Telegraph Co. yesterday by quickly approving the landmark divestiture plan the Bell System signed only four days ago.

The action appeared to overturn a carefully worked out plan by AT&T and the Justice Department to give U.S. District Court Judge Harold H. Greene the power to approve the settlement. It also may have served to bar any interested parties such as consumers and AT&T's competitors from commenting on the plan as part of the legal proceedings.

Contrary to the procedural plan that AT&T and the Justice Department had drawn to end the government's 8-year-old antitrust case against the Bell System, U.S. District Court Judge Vincent P. Biunno approved the settlement plan only hours after he held a 30-minute hearing with AT&T and Justice Department officials.

At that hearing, both sides asked the judge not to approve the settlement but rather to relinquish his supervision of an earlier government settlement that is the mechanism for the current divestiture plan to Judge Greene.

That way, the judge who had just heard more than 10 months of testimony on the Bell System would oversee the settlement plan. Additionally, this procedure would allow outside parties to testify on whether the break-up plan was in the public interest--a move AT&T and the Justice Department voluntarily agreed to as part of the settlement to avoid future criticism.

But in his decision, Biunno said the settlement "is in the general public interest," for AT&T and consumers, and therefore should be approved immediately. The half-hour hearing, together with some materials AT&T and the Justice Department filed in his court last year, were sufficient to make this determination, he said.

Biunno's action, however, caught the Justice Department by surprise, officials acknowledged last night. But if the parties can convince Biunno to transfer the settlement to Greene, "we're hopeful" there will still be meaningful ways for the public to comment, spokesman Mark Sheehan added.

Even so, Biunno's decision immediately raised doubts about the status of the government's attempt to dismiss its antitrust case against the Bell System.

Although the $80 billion divestiture plan was drawn to end this suit, some communications lawyers said that Greene, the judge trying the case here, could refuse to dismiss the case so long as he has no control over the historic agreement.

Justice Department and AT&T officials discounted this theory, however, saying the judge has no choice but to dismiss a case when both parties voluntarily agree to end the suit.

Just what the judge's intentions are may become clear this afternoon at a hearing Judge Greene called last week, hours after he learned of the settlement. Greene ordered the court clerk not to accept the dismissal motion formally until he held a hearing on whether the suit should be dropped.

In the meantime, sources said Justice Department lawyers may appeal Biunno's decision to make sure the settlement is transferred to Greene's court.

The government's suit, which had been in trial for almost 10 months, sought to break up AT&T into several separate companies on the ground that it monopolized the telecommunications industry. Throughout the trial, AT&T had argued that such a "dismemberment" of its system would hurt the telephone network and the company.

But last week, AT&T Chairman Charles L. Brown signed a divestiture agreement, saying it was the only way the company would be allowed to enter any business activity it wished. By agreeing to divest all of the local operations of its 22 local operating companies, AT&T got the government to modify provisions of a 1956 consent decree that barred the company from offering any unregulated, nontelephone services such as computer processing, which the company has eyed for more than a decade.

At the same time, the government agreed to drop its 8-year-old antitrust suit here in Washington.

In dropping the suit, both sides agreed to modify the 1956 decree rather than enter a completely new decree in the federal court here. They also wanted Greene to oversee the divestiture, but because the decree was filed in a New Jersey court and was being overseen by Biunno, they first needed his approval to transfer the decree down here.

Late Sunday night, Biunno called a hearing on the transfer request for early the next day. Hours after the hearing, he thwarted the plans of AT&T and the Justice Department by summarily accepting the settlement instead of transferring it to Greene's court.