Like sunshine in Irish weather, Ireland's new prime minister was in America the other day long enough to be sorely missed when he vanished. But while here --lunching at the White House on St. Patrick's Day with President Reagan, meeting with the 52-member Friends of Ireland congressional group--Charles Haughey was a warming sun.

For the first time, an Irish prime minister came to America with the message that a large part of the solution to the violence in Northern Ireland depends on British withdrawal.

Haughey uttered the thought in a White House speech that he laced with historical allusions to legendary Gaels like Wolfe Tone and some blarney about Ronald Reagan's "redoubtable" ancestors who were 16th century "defenders of the hills" in Eire's Slieve Bloom mountains. But neither the whimsy nor Haughey's soft brogue could hide the power of the most important statement in his quick visit to America: in Northern Ireland "there is much to be done; and the first thing is that Britain be encouraged to seek more positively and persuade more actively a change in attitudes and outlooks which would pave the way for unity and so enable her final withdrawal from Ireland to take place with honor and dignity."

Before Haughey, Irish leaders talked around the subject of British withdrawal, like tourists circling the Ring of Kerry. A united and British-free Ireland, it was said, was a fine broth of a vision. But amid all the killing and hating in Ulster, it was necessarily a vision for the next century. Pining for unity --drinking to it in toasts made by both the castle Irish and the one-toilet Irish --was preferred to working for it.

In the shadows lurked another problem. "Get the Brits Out" was seen as the radicalism expressed on the placards of the violent wing of the IRA.

But Haughey is showing that it is possible, even logical, to condemn IRA terrorism while still agreeing with one of the group's goals. In fact, the Brits- Out argument predates the current mouthings of IRA gunmen, going back six decades when the counties of the north first suffered British partitioning from the rest of Ireland.

The separation was arbitrary and artificial. It transformed a minority (Protestant) into a majority that had the option of denying the new minority (Catholic) its civil rights. The option, as the record of bigotry shows, was exercised.

Now that the world has seen that Britain's presence in Ulster has meant decades of civil rights violations against Catholics, it is not enough to keep with the faint hope that the Protestant majority will suddenly embrace justice. This is like saying, of the early 1960s in America, that the blacks should have kept hoping for a change of heart in George Wallace and Bull Connor.

Haughey's call for final withdrawal was not the cry of radicalism it is being made out to be. It is a view more and more expressed even in Britain. This explains Haughey's speaking directly to the issue that always arises when British withdrawal is mentioned--the reaction of diehard Unionists and the Paisleyite fanatics of Northern Ireland. "All of us are slightly weary of being warned that if we do anything we are going to run into Unionist intransigence," he said. "We must move ahead in a positive way."

The movement is risky for Haughey. He took office just weeks ago with only a bare majority. To get it, he made concessions to Ireland's left, which is correctly demanding that the new government keep directing economic aid to Dublin's poor as the Irish economy worsens. Haughey's leftward tilt reminded people that 12 years ago he was tried for the importation of arms. He was acquitted, but among the suspicious Orangemen of the north, the taint of guilt haunts reputations as darkly as guilt itself.

Haughey's visit to Washington, which had the Friends of Ireland wearing sprigs of fresh shamrock in their lapels, was a call for American politicians to go beyond the standard condemnations of violence in Northern Ireland. By forcing the issue of British withdrawal, Haughey was issuing an invitation to the Americans--from Reagan to O'Neill--to become the kind of pressure group, with or without shamrock, Ireland desperately needs.