President Reagan, in one of his strongest endorsements of the use of military force against terrorism, said yesterday that Israel and other nations had the right to strike back "if they can pick out the people responsible."

When asked by reporters whether Israeli pilots had selected the appropriate target in yesterday's raid on the headquarters of the Palestine Liberation Organization in Tunis, Reagan said he had "great faith in Israeli intelligence capabilities."

The Israeli raid was in response to the murder of three Israeli civilians in the port of Larnaca, Cyprus, on Sept. 25.

Reagan's comments during a brief White House news conference were made a few hours after an administration spokesman characterized the Israeli raid as "a legitimate response" and "an expression of self-defense" against past acts of violence against the Jewish state by Arab terrorists.

The administration's open endorsement of the raid was a contrast to the president's cautious attitude toward any U.S. retaliation during the hostage crisis of last June, when 39 Americans from a TWA airliner were held captive for 17 days in Beirut.

At that time, Reagan said that in retaliation, "if you just aim in the general direction and kill some people, well, then you're a terrorist, too."

Reagan's comments were also in contrast to the administration's strong condemnation of the Israeli air attack on Iraq's nuclear reactor outside Baghdad in June 1981. More recently, the State Department deplored the violation of Tunisian air space on Sept. 23 by four Libyan jets, which a U.S. spokesman said violated "all norms of international behavior."

A spokesman for the Tunisian Embassy here said his government was "astonished, to say the least," by the administration's approval of yesterday's Israeli raid.

"It doesn't square with what your president said to our president about the U.S. commitment to Tunisia's territorial integrity," the spokesman said, referring to President Habib Bourguiba's visit here last June.

White House spokesman Larry Speakes, while acknowledging that the United States did not have "the full story" on the attack, said that preliminary reports appeared to show that Israel had a legitimate reason for retaliation.

"As a matter of U.S. policy, retaliation against terrorist attacks is a legitimate response and an expression of self-defense," he said. "The president has said linking those who commit crime to those who are punished is essential."

Asked if this U.S. policy applied to other areas of the world, Speakes replied, "Yes."

Reagan refused to comment on whether U.S.-made warplanes had been used in the Israeli raid, saying, "I don't know. I don't know the facts." U.S. arms export regulations restrict the use of U.S.-made military hardware in some offensive actions, but administration officials characterized the Israeli raid as "defensive."

Speakes also said, "We are distressed by and deplore the cycle of violence in the Middle East, of which the latest incident is a part. It underscores the urgent need to work for peace in the Middle East."

The Israeli attack occurred as Jordan's King Hussein is in Washington to discuss ways to move the Middle East peace process forward.

It was not immediately clear what impact, if any, the Israeli raid might have on the king's willingness to continue the talks. But Rep. Lawrence J. Smith (D-Fla.), who attended a meeting with him yesterday, said, "he didn't make any big deal about it."

The Israeli raid on the PLO headquarters in Tunis was conducted after the Israeli government had repeatedly charged that the organization, led by Yasser Arafat, was behind two aborted sea raids on Israel earlier this year by Palestinian guerrillas as well as the Sept. 25 operation in Larnaca in which three Palestinians took hostage and then killed three Israelis aboard a yacht.

However, a Cyprus spokesman Monday said that from its investigation and interrogations so far of the three captured Palestinians, "no evidence has emerged leading to the conclusions that some organization, and which, is behind this affair."