Hand Leonard Bernstein a baton and he'll lead the band, which is what he did at the White House last night. It provided the lightest note in an otherwise somber day.

Bernstein's impromptu performance came at the start of President Carter's state dinner for Prime Minister Jack Lynch of the Irish Republic. Bernstein stepped up to the podium to conduct the Marine Band in the ballet music from "Aida" and the musicans loved it.

But the spontaneity of Bernstein and the lighthearedness, later in the evening, of Prime Minister Lynch were in marked contrast to the grim expressions of the top American officials at the dinner.

The mounting tension over the safety of the American hostages in Iran had dominated the day for many of them. Secretary of State Cyrus Vance characterized his day as "tough, very tough, one of the busiest." And Vice President Mondale said National Security Advisor Zbigniew Brzezinski was over in the White House situation room keeping track of developments.

In his pre-dinner toast, President Carter said, with emotion, "Ireland is a nation which has suffered from bloodshed and division. Ireland is not alone in modern-day suffering."

And then he told the 140 guests standing in the East Room about the Americans who "are suffering from international terrorism and . . . being held against their will."

Later, in the Blue Room, the president said he didn't want to talk about the Iranian situation, but he did say, "we've had a lot of help from around the world among leaders of Islam, the Arab religious and political leaders and from the U.N. We hope that world opinion and the conscience of the Iranian people will prevail."

In his toast, Prime Minister Lynch spoke of Ireland's improved economy. "We're doing fairly well in Ireland. The population is increasing." He said it reminded him of the story of a woman who was deciding whether to have her seventh child but hesitated because she had "read somewhere that every seventh child born in the world is Chinese." He got a good laugh, though Vice President Mondale's face turned beet red and Chief of Protocol Abelardo Valdez looked uneasily a round the room.

In his East Room remarks Lynch made no mention of the problems in Northern Ireland or Iran. But after dinner, in a wide-ranging discussion with reporters, he bluntly sized up the crisis.

"It's a sad situation when you have a regime that even the American government can't talk to, and they yield officially to terrorism," he said.

Of the Ayatollah Khomeini Lynch said, "A man who regards himself as a holy man and says 'Thank god the Shah has cnacer' -- one begins to doubt his bona fides.

"There must be some reasoning that can prevail even against the fanatic -- I don't like to use that word -- approach of the Iranians at this time. It's extraordinary that a man who lived in exile can go back home and obstruct the world economy to the extent he has done."

Among the guests was Rep. Mario Biaggi (D-N.Y.), whose presence reportedly raised some Irish eyebrows because of his sympathies for the Provisional Wing of the IRA. Biaggi said he didn't know if Lynch considered it an affront, but mentioned that the two met earlier in the day at a foreign affairs tea on capitol Hill.

Calling Lynch "a gracious statesman," Biaggi said he had asked whether Lynch would participate in a conference which would include the militant Provisional Wing of the IRA. He said he was not satisfied with the prime minister's answer, although tea ground rules prevented him from disclosing it.

"Someone asked me if I'd feel uncomforable tonight and I said I'm never uncomfortable in the presence of my president. Fundamentally," Biaggi added, "I'm gracious."

Lynch, asked whether he had been "affronted" by the invitation to Biaggi, answered, "not at all . . . he was invited here by my host, I have no right to be upset."

Most of the guests weren't even aware that it was Leonard Bernstein, the flamboyant conductor, who was standing there leading the red-coated Marines in the foyer of the White House. But the moment Bernstein caught sight of the band, he started waving his arms in mock gestures that Marine Maj. John Bourgeois quickly picked up by putting a baton in his hand.

"Great," Bernstein said, a cigarette dangling from his mouth, arms pumping widely, "how sexy! . . . haven't done this for a long time . . . babababababa, oh, my favorite."

"A-1" Bernstein rated the band.

"Tops," Staff Sgt. Kevin Kosty, a cellist rated Bernstein.

"Give him a couple of years," added Master Gunnery Sgt. David Johnson, trumpeter.

Though President Carter made a passing reference to the "many Irish president" in past American history, the name Kennedy and the topic of presidential politics took a back seat to international affairs.

Maine Gov. Joseph Brennan, who two weeks ago endorsed Sen. Edward Kennedy, said he didn't think his appearance at the White House was out of order. "I have a governor's mansion in Maine and often people come to my house who don't share my opinions."

Rep. James Howard (D-N.J.) said he hadn't made up his mind about the 1980 race. "Four years ago, I came out the first day Mo Udall declared. And I stayed with him right to the convention. I'll tell you, it keeps a lot of people off your back. But I haven't decide yet."

When Thomas Mcgee, the speaker of the Massachusetts House of Representatives, arrived last night, he waved aside any questions of a pending endorsement. "My position is the same as the speaker of the House of Representatives in Washington," said Mcgee as he ran to catch up with the House speaker, Tip O'Neill.

By the end of the evening, the president was a solitary figure as he stood listening to the Marine Band playing music from Bernstein's "West Side Story."

Not far away stood Miss Lillian, substituting as hostess for an absent Rosalynn Carter, who flew to Thailand this week to inspect the Cambodian refugee camps.

Carter was quiet and appeared introspective, but he had a few upbeat moments. During one of these he was asked the cause of his good mood.

"The Irish helped," he said.

The following were guests at President Carter's state dinner last night for Prime Minister and Mrs. John M. Lynch of the Irish Republic: Michael O'Kennedy, minister of Foreign Affiars of Ireland, and Mrs. O'Kennedy. Sean Donion, ambassador of Ireland, and Mrs. Donlon. Andrew O'Rourke, secretary general, Department of Foreign Affairs, and Mrs. O'Rourke. Dermot Nally, deputy secretary general, Department of the Prime Minister. Walter Kirwan, assistant secretary general, Department of the Prime Minister. Frank Dunlop, government press secretary. Commandant Christopher Leaney, aide-de-camp to the prime minister. Paul Dempsey, counselor, Embassy of Ireland, and Mrs. Dempsey. John Burke, counselor, Embassy of Ireland, and Mrs. Burke. Vice President Walter Mondale. House Speaker Thomas P. O'Neill and Mrs. O'Neill. Secretary of State Cyrus Vance and Mrs. Vance. James T. McIntyre Jr., dir., Office of Management & Budget, and Mrs. McIntyre. Reubin Askew, special representative for Trade negotiations, and Mrs. Askew. Sen. Claiborne Pell (D-R.I.), and Mrs. Pell. Sen Walter D. Huddleston (D-Ky.), and Mrs. Huddleston. Sen Robert B. Morgan (D-N.C.), and Mrs. Morgan. Sen Daniel P. Moynihan (D-N.Y.), and Mrs. moynihan. Gov. Brendan Byrne (D-N.J.), and Mrs. Byrne. Gov. John Garrahy (D-R.I.), and Mrs. Garrahy. Gov. Joseph E. Brennan (D-Maine). Rep. Joseph M. McDade (R-Pa.), and Mrs. McDade. Rep. James J. Howard (D-N.J.), and Mrs. Howard. Rep. Mario Biaggi (D-N.Y.), and Mrs. Biaggi. Rep. Mike Lowry (D-Wash), and Mrs. Lowry. Frank B. Moore, assistant to the president for congressional liaison, and Mrs. Moore. Anne Wexler, assistant to the president, and Joseph Duffy, chmn., National Endowment of the Humanities. Alonzo McDonald, assistant to the president and White Hose staff director, and Mrs. CDonald. Gen. David C. Jones, USAF, chmn., Joint Cheifs of Staff, and Mrs. Jones. William V. Shannon, American ambassador to Ireland, and Mrs. Shannon. Abelardo Valdez, chief of protocol, and Mrs. Valdez. George S. Vest, assistant secretary of state for European affairs, and Mrs. Vest. James Rentschler, National Security Council staff member. George C. McGhee, former amabassador, Washington, D.C., and Mrs. McGhee. Charles B. Curtis, chmn., Federal Energy Regulation Commission, and Mrs. Curtis. Mr. and Mrs. Ivan Allen Jr., Atlanta, Georgia. Leonard Bernstein, New York City. Guest: Robert Lee Kirkland III. Mr. and Mrs. Searcy Bracewell, Houston, Texas. Mr. and Mrs. Ronald Brown. Mr. and Mrs. Alberto Bustamante, San Antonio, Texas. Patrick Caddell, Washington, D.C. Guest: Helen Holings. Lillian Carter, Plains, Ga. Mr. & Mrs. Charles Cherry, Daytona Beach, Fla. Hon. & Mrs. John H. Connors. Mr. & Mrs. Patrick J. Cunningham, Bronx, N.Y. Mrs. Richard J. Daley, Chicago, Ill. Guest: Patricia Daley Thompson. Mr. & Mrs. William M. Daley Jr., Chicago, Ill. Kevin Delany, Washington, D.C. Guest: Jane Sanders. Mr. & Mrs. Thomas Donahue. Mr. & Mrs. Edward Fay, Pittsburgh, Pa. Gary Fifield. Mr. & Mrs. James Gannon, Des Moines, Iowa. Mr. & Mrs. Neil Hartigan. Mr. & Mrs. Thomas C. Hynes, Chicago, Ill. Mr. & Mrs. Jeremiah Joyce, Chicago, Ill. Mr. & Mrs. Richard Kvamme, Moorehead, Minn. Mrs. George London, Armonk, N.Y. Mr. & Mrs. Thomas H. D. Mahoney. Mayor Henry L. Marsh III of Richmond, Va., and Mrs. Marsh. J. Patrick McElroy, Clearwater, Fla. Guest: Mary Evretz. Mr. & Mrs. Thomas W. McGee. Mrs. Thomas J. McIntyre, Washington, D.C. Guest: Martin Malarkey. George Meany. Guest: Ernest S. Lee. Mr. & Mrs. Lawrence O'Rourke, Chevy Chase, Md. Mr. & Mrs. Daniel M. Rooney. Mr. & Mrs. Terence Smith, Chevy Chase, Md. Mr. & Mrs. Maurice B. Tobin, Washington, D.C. Mr. & Mrs. James Vance, Worthington, Minn. Earline Watkins, Eatonville, Fla. Guest: Broderick McKinney. Mr. & Mrs. Morton M. Winston.