HOW did it come to this? How did the process of nomination and confirmation to the Supreme Court become so painful and divisive, so unsatisfactory for everyone concerned?The soap-opera confrontation between Clarence Thomas and Anita Hill cannot be understood as an isolated phenomenon. Whatever the truth on the specific charges of sexual harassment, this matter's magnification into such high national drama is symptomatic of a much larger problem concerning the politics of the nation's judiciary. The underlying problem is the failure of the Republican executive branch and the Democratic legislative branch to join properly in their battle over the ideological direction of the court. The president acts as if he has the right to place his own ideological stamp on the court. The Senate speaks as if it is obliged to acquiesce in such a presidential right, but it cannot bring itself to act that way. The Constitution confers no such presidential prerogative, and it imposes on the Senate no such obligation. The judiciary - a third and autonomous branch - is the creature equally of both the other branches. As long as the president stubbornly asserts a power that is not his, and as long as the Senate feels compelled to find excuses for exercising its legitimate powers in the appointment process, that process will continue to unfold in destructive ways. Neither side is satisfied. The conservatives are bitter about what they regard as character assassination by the opponents of Mr. Thomas and Robert Bork; the liberals are frustrated by the evasiveness of such recent nominees as Anthony Kennedy and David Souter. Both are right. And the sins grow out of the failure of the two sides to reach accommodation in an essentially political struggle. The Democrats have become merciless out of their fear of openly asserting their power to block the appointment of justices they don't want to see on the court. The Republicans have become dishonest out of their fear of being open about their agenda to reverse the rights revolution of the past several decades. The political system has failed to adjust to the changed politics surrounding judicial appointments. Presidents did not always use their judicial appointments for such blatantly ideological purposes. It was the Republican Eisenhower who appointed Earl Warren. While the comparatively conservative Byron White was appointed by Kennedy, Ford's appointee Justice John Paul Stevens often sides with the liberals. It began with President Reagan that the appointment of justices to the highest court has become subs ervient to the agenda of a faction outside the moderate American center. The right wing has been aided in achieving its purposes by the custom, born of more moderate days, that the Senate is obliged to approve a nominee unless he or she is incompetent or unfit. But that is only a custom. It is nowhere in the Constitution. What is in the Constitution is a senatorial power as real and legitimate as the president's right to veto legislation he does not like. Just as the president has the right to tell the Congress that if they want his signature on a civil rights bill it must se nd him one he likes, so does the majority in the Senate have the right to tell the president that if he wants a justice approved he'll have to nominate one they want on the court. The "strict constructionists" on the right can hardly complain if those on the left put aside the custom of senatorial deference in favor of the exercise of explicit constitutional powers. IN the meanwhile, however, the country goes through agonies because of the discrepancy between the actual power of the Senate and the felt inhibitions on its use. Muckraking becomes the messy tool to achieve a purpose that would be much better accomplished by the clean use of constitutional power. Alan Ginsburg was disqualified for smoking marijuana. But we never found out how many of the justices who were young during Prohibition failed scrupulously to obey that law of the land. Did Clarence Thomas sexu ally harass his subordinate? Thomas Jefferson, who purportedly fathered illegitimate children by one of his slaves, is celebrated by a marble memorial. Few could withstand the present level of scrutiny. But if the president and the Senate compromised in advance on a nominee, there would not be unleashed such energy to discover skeletons in the closet. Appointments to the court are political, and politics is about power. When powers are divided, politics becomes the art of compromise. Once a nominee is named, it is too late for compromise: It is a matter of yes or no. "Advise and consent" has broken down because the president has failed to give, and the Senate has failed to demand, a meaningful advisory role for the Senate in the naming of Supreme Court justices. If the liberals and conservatives can do battle and reach accord at the advisory stage, the stage of consent need not be so messy and bitter.