Menachem Begin played a return engagement at the White House last night in a role he began in 1977. As leading man in the unending drama of the Middle East, he was once again courting an American president.

The state dinner President and Mrs. Reagan gave for Begin on his 12th U.S. visit climaxed the day of meetings between the two leaders, who are getting acquainted for the first time. From outward appearances, at least, they seemed to hit it off. Begin said in his after-dinner toast: "You gave us today a good day, one of the few."

Reagan responded in his toast: "I should say the prime minister is no stranger to this room. I have a funny feeling he may have dined here more often than I have."

Whatever their respective moods, the stage for their first meeting was colorfully set, including some imported glamor from Hollywood and New York.

"I guess it's a show-biz night," said Sen. Paula Hawkins (R-Fla.). "Regardless of what happens, we and the Israelis are still friends."

Certainly all who were there last night seemed to be friends, whatever their positions on the nuts and bolts of the Reagan-Begin meetings: the administration's proposed sale of AWACS to Saudi Arabia. As the guests mingled with the Reagans and the prime minister, whose wife had remained at home because of poor health, pres- idential counselor Edwin Meese characterized yesterday's meetings as "very friendly." On the AWACS issue, said Meese, "both the prime minister and the president expressed their points of view. There was no relative misunderstanding. Because of the candid points of view, maybe it will relieve some of the differences."

"I'm totally opposed to the sale of AWACS. I've made my position known," said Sen. Alfonse D'Amato (R-N.Y.). "But the main thing is that Israel and the United States will be enduring allies." D'Amato and former senator Jacob Javits, the man he unseated last fall, had a polite if brief encounter when they arrived, in what one observer described as "a minimum of pleasantries."

Sen. Charles Percy (R-Ill.), chairman of the Senate Foreign Relations Committee, said he didn't see how any of his colleagues could take a position on the proposed $8.5 billion AWACS package because "we haven't even seen it. And when we do, the three questions we have to answer are what effect it will have on the security of Israel, on the national interests of Saudi Arabia and on the security of the United States."

His expections of the Reagan-Begin summit, said Secretary of State Alexander M. Haig, boiled down to "putting some meat on the bones of rhetoric."

During his toast, Begin told a story in which he visits the Oval Office and sees three telephones. President Reagan tells him the white phone is a direct line to British Prime Minister Thatcher, the blue one to French President Mitterand and the red one a direct line to God. When Begin asks if he uses the red one often, Reagan tells him, "Oh no, it's long distance and very expensive. I can't afford it because I'm cutting the budget."

Begin's story continued with Reagan paying a return visit to Jerusalem where he spots three telephones in the prime minister's office. The white one is to Egyptian President Sadat, the blue one to Thatcher, and the red one a direct line to God, Begin tells the president. Asked if he uses the red one often, Begin tells him, "Every day."

"Well, how can you afford it?" Reagan asks.

"Here in Jerusalem it's considered a local call," Begin responds.

Dinah Shore, in a glittering white diaphanous sheath, moved quickly among the politicos and garnered a seat at the president's table. Producer David Susskind introduced his producer son Andrew to Reagan, with the fatherly, "He's trying to fill my shoes."

The White House, for Shore, was familiar territory, both as an entertainer and friend. "The Reagans are old friends. I've known them a long, long time. I haven't been in the White House as a guest since Johnson but I did a taping here with Jody Powell," said Shore as she turned to embrace advice columnist Ann Landers.

"I'm giving no advice tonight; I'm a guest," said Landers, who in private life is Eppie Lederer.

Landers also counts herself as a Reagan friend. "I met them via the Walter Annenbergs and we spent a weekend together in Palm Springs. Now that was before he was elected and I told him I was a dyed-in-the-wool Democrat and could never vote for him," she said. "He took it good-naturedly but before the election I decided the country couldn't stand another four years of Carter."

Comedian Mort Sahl, who has made a few tries himself for the White House, said that was all a thing of the past.

"I wouldn't run against my friend," he said, adding that he thought Reagan was holding the line for the moment. "He hasn't sold 'em any planes for almost a week."

Another friend was Teamsters union vice president Maurice Schurr of Philadelphia, who said that if the air controllers' strike were legal the Teamsters probably would stick with them, "but I think it's illegal."

And there were other friends -- Milton Rudin of Los Angeles, Frank Sinatra's attorney; author Herman Wouk of Washington and Israel artist Yaacov Agam, who flew in from Paris for the dinner.

"The Annenbergs discovered me, and the president has a few of my works upstairs in their private living quarters," said Agam, showing off a circle of glass etched with his name and the Star of David.

After the 96 guests had dined on filet of sole, chicken in tarragon, wild rice, broccoli, cheese and watermelon, available in both kosher and non-kosher versions, pianist Andre-Michel Schub performed. Both President Reagan and Begin spoke animatedly to Nancy Reagan during the young artist's strenuous, physical performance.

"The president said some very sweet things," said Schub, admitting in his excitement that he couldn't remember the specifics. His exuberance seemed contagious, as the Reagans led off the after-dinner dancing to the show tune "Shall We Dance." Also joining in the lively dance session were Shore and special U.S. envoy Philip Habib, and Landers and Percy.

The first lady's press office also instituted a new ground rule for the working press, forbidding the use of tape recorders while interviewing guests. The new rules also limited access to the president and his guest of honor until the time they were leaving the dinner.

"We thought the rights of guests were paramount. I made the decision this week to start with this dinner," said Sheila Tate, press secretary to Nancy Reagan.