The Justice Department and the Supreme Court are at odds over whether federal officials can be sued for violating the civil rights of citizens, and the clash is heading for a legislative showdown.

Twice this term, the court ruled that federal officials are not immune from civil suits arising from performance on the job.

But the Justice Department, since last September, has been trying to persuade Congress to approve legislation providing such immunity.

The department made some headway this week, when a House subcommittee approved its bill without change. The bill will be reviewed by the House Judiciary Committee in a few weeks. It is still under consideration by a Senate subcommittee.

The Justice Department bill was a reaction to a series of suits brought against federal officials - most of them FBI and CIA agents - after a 1971 Supreme Court ruling that federal law enforcement officials could be held liable for violating a citizen's civil rights if they acted in bad faith.

But the two court rulings this term, one in Butz v. Economou and the other in McAdams v. McSurley, have sharpened the clash between the executive and judicial branches of government.

The Justice bill would make the United States the sole defendant when citizens claim their constitutional rights have been violated. It would protect all federal officials - not just law enforcement officials.

Recently, the Justice Department offered to tighten its disciplinary proceedings against officials who violated citizens' rights to compensate for granting officials immunity from civil suits. Civil liberties groups responded that the threat of disciplinary action was not as much a deterrent as the threat of civil suit. The bill approved by the House subcommittee on administrative law makes no attempt at a compromise - it would give officials immunity from suits and has no provision for disciplinary action.

Attorney General Griffin B. Bell has been pushing the bill because by eliminating private suits against federal officials, the department could stop using government and private lawyers to defend these officials. But there is no Statute that says the department must - or even should - defend officials in private suits.

Bell also says the threeat of a civil suit destroys morale and discourages federal officials from performing their assignments vigorously and courageously.

The American Civil Liberties Union and the American Bar Association, which are fighting the bill, say it would have an effect opposite to Carter administration promises for "greater accountability of officials and stronger safeguards against abuse."

They say that taking away the threat of personal liability will encourage such abuses as illegal wiretapping mail openings and break-ins.

"The bill could end up providing a form of 'no fault' insurance for constitutional violations," said John Shattuck of the ACLU. "The government writes the victim a check for a thousand dollars, and the individual employe or official may bear no responsibility."

Citizens have been able to sue the federal government for violations of their constitutional rights since 1974. They have been able to sue federal law enforcement officials for those violations since 1971. But it was unclear until this term of the Supreme Court whether citizens could sue other federal officials for such transgressions. Then, in two cases - Butz v. Economou and McAdams v. McSurely - the Supreme Court said no federal executive official was immune from suit.

"The extension of absolute immunity to all federal executive officials would seriously erode the protection provided by basic constitutional guarantees," Justice Byron White wrote in Butz v. Economou.

The Supreme Court's decision to hold federal officials liable for violating rights went back to the pattern of court decisions before 1900. It broke with the pattern that had been established between 1900 and 1970.

Until the 1900s, courts upheld the principle that public officers did not have greater immunity from suit than ordinary citizens. They derived that principle from the boast of American democracy: No man is above the law. Thus, when health officials in Massachusetts made an honest mistake and killed the wrong horse in 1891, the horse's owner sued them for depriving him of his property - and he won.

But in the 1900s, as the population multiplied and government became more complex and anonymous, courts stopped applying such strict standards. In fact, by the 1920s, the only standard was that as long as the official had to exercise some discretion to carry out his job, he could not be held liable for violating citizens' rights. It became quite rare for citizens to bring suits against officials. It became even rarer for citizens to win.

In 1971, the Supreme Court used a formula that struck a balance of sorts between citizens' rights and officials' responsibilities: Law enforcement officials would not be immune from suits unless they could prove they had a good faith belief in the reasonableness and legality of their actions. Honest mistakes would be tolerated. Maliciousness would not.

The "good faith" defense has been used by officials in France since 1870. Before then, French officials were immune from suits. Under current French law, officials can be personally liable only if they have acted willfully, maliciously, with gross negligence or outside the scope of their official functions.

In West Germany, officials cannot be sued although the state can be sued for their wrongs. The state can in turn sue the official, but that rarely happens.

"The German attitude toward the official is that he should be trusted," said Mirjan Damaska, a professor of law at Yale University. "If he proves otherwise, the civil service bureaucracy may forget about his advancement."

In the United States there are certain officials who have absolute immunity from suits and do not have to justify their actions with a "good faith" defense - judges and prosecutors. The Constitution gives senators, representatives and their staffs absolute immunity "for any speech or debate in either house," but the Supreme Court said this term that their immunity does not extend to lawbreaking.

During the past seven years, 285 cases have been brought against federal officials - most of them FBI and CIA agents - for violating citizens' constitutional rights. Sixty-five of those cases have not been decided. All but five of the officials who violated citizens' rights have successfully used the "good faith" defense and have not had to pay damages.

In the few cases in which officials could not prove they acted with good faith, damages usually were nominal. For example, former White House aide Morton Halperin, who sued Richard M. Nixon and H.R. Haldeman for wiretapping his phone, was awarded only S5 last year. Halperin did not prove that he suffered economic harm, but if he had he could have been awarded damages of $100 for each day his phone wiretapped.

Heavy damages against a federal official were arrested without being charged with crimes and were htrators who sued U.S. Capitol Police Chief James Powell and Metropolitan Police Chief Jerry Wilson for violating their First Amendment rights in 1971. The demonstrators were attacked without being charged with crimes and were held in jail for two days. They were awarded damages of $7,500 each, but that decision still must be reviewed.

The Justice Department's bill would permit citizens to collect damages from the government if their constitutional rights were violated, whether or not the officials had good faith in the legality of their actions. Civil liberties groups agree that citizens should collect from government regardless of motive, but they say citizens also should be able to sue officials.

"The immunization of federal employes from civil liability . . . would remove an existing deterrent against illegal conduct," Shattuck said. "Neither existing disciplinary practices nor the threat of criminal prosecution will serve an adequate deterrent function."