Defenders and critics of the Reagan administration's policy in El Salvador yesterday seized on the killing of 30 people there earlier this week as evidence to support their views on what the United States should do in that violence-torn Central American country.

Spokesmen at the White House and the State Department said the killings "serve to reinforce our determination to support the centrist government" of El Salvador so as to "help break this vicious pattern" of violence.

But on Capitol Hill, Senate critics of the administration's policy called for an end to military assistance to the Salvadoran government, while a former American ambassador to El Salvador said that by sending military aid and 56 military advisers to the country the administration was providing "the only cause that could possibly revive" the hopes of leftist insurgents there.

Officials in El Salvador have acknowledged that government security forces killed the 30 civilians Tuesday in Soyopango, a suburb of the capital of San Salvador. According to some accounts, the shootings followed an armed attack on an army patrol, while in other accounts police units were held reponsible for the shootings.

Yesterday the director of El Salvador's treasury police, whose agents were thought to be involved in the killings, said 59 agents were being dismissed and that some faced possible criminal charges. He did not specify whether this action was related to the killings.

The Reagan administration said it was awaiting a full report on the incident before deciding who was responsible. White House deputy press secretary Larry Speakes refused to say whether the United States would withdraw its support for the government in El Salvador should it be found that government forces were responsible.

Speakes said he would not answer a hypothetical question. He emphasized that the El Salvadoran government's effort to strengthen its regular armed forces, as opposed to undisciplined security and police forces thought to be involved in much of the killing, was the best way to reduce the violence.

A similar theme was struck at the State Department by spokesman William J. Dyess. He said El Salvador continues to be "beset by extremist forces of both the left and right which deliberately instigate violence because they know it is the only way progress can be stopped."

The best hope for a solution, Dyess said, is to strengthen the central government against these extremist attacks. He said preliminary indications suggest that the attack in Soyopango was not the work of regular military units.

Meanwhile, Sen. Edward M. Kennedy (D-Mass.) said the killing of the 30 people is the latest example of why legislation sponsored by him and Sen. Apul Tsongas (D-Mass.) that would suspend military aid to El Salvador should be enacted.

The killings, he said, "demonstrate again that it is essential to end the military escalation and pursue a political solution to this tragic conflict."

Kennedy was joined in his criticism by Democratic members of the Senate Foreign Relations Committee who yesterday questioned Robert E. White, the former U.S. ambassador to El Salvador and a sharp critic of the military aid program.

White said it is critical for the United States to strengthen the hand of Jose Napoleon Duarte, the Christian Democrat civilian who heeds El Salvador's civilian-military government.

But White said the military aid program and the introduction of American military advisers into the country "emphasized a military solution and strengthened precisely the wrong group" -- the military rather than the civilian powers in the government.

White said leftist insurgents remain active in the country but are not strong enough to overthrow the government. The military aid program and the advisers, however, "gave a propaganda victory to the left," he said.

The administration "found the only possible way to strengthen the left," White said.

White also estimated that two-thirds of the civilian deaths in El Salvador were the responsibility of right-wing groups or government security forces.