The Supreme Court yesterday heard debate on the question of whether cameras should be allowed in trial courtrooms -- a controversy whose resolution in the nation's highest court could affect programs in more than half the states.

The case argued yesterday involves the burglary conviction of two Miami Beach policemen, who now assert that they were denied a fair and impartial trial because a television camera was allowed at the proceedings. Flordia is one of at least 26 states that allow still photography and television cameras in their courtrooms.

The Supreme Court's decision in the case, which has drawn the interest of dozens of major media, judicial and legal groups, could put to rest a controversy that has raged since the American Bar Association laid the groundwork in 1937 to prohibit cameras and broadcast equipment from judicial proceedings.

In oral arguments yesterday, attorney Joel Hirschhorn told the nine justices that the "mere presence of cameras in the courtroom" prejudiced the 1977 trial of the two policemen. Hirschhorn had argued in his written appeal that the cameras distract jurors and have an "inhibiting" effect upon jurors, witnesses and attorneys. In the presence of the cameras, Hirschhorn said yesterday, "timid people become more timid, nervous people become more nervous" and the fears of those not used to appearing in court are exacerbated. n

Opponents responded that former policemen Noel Chandler and Robert Granger had received a fair trial. In written arguments to the court, Florida Attorney General Jim Smith asserted that the defendants had failed to show any evidence that the coverage had prejudiced their case. He also argued that Florida's interest in "open government and public confidence in the judiciary" was a reasonable basis for allowing television coverage in the courtroom and that federal courts should not interfere with this decision without a compelling reason.

The hour-long arguments before the court also offered the first public glimpse of several of the justices concerns on this controversial issue.

Chief Justice Warren Burger, who has vehemently opposed electronic coverage of Supreme Court arguments or announcements of opinions, repeatedly asked Hirschhorn how scientists, judges or laymen could determine the consequences of television coverage of trials without experimentation.

But Burger also wanted to know about abuses that might occur, for instance, if a television station decided to run coverage of a trial and then an "instant guilty-or-innocent poll," in which viewers could call in and cast their votes for or against a defendant.

The chief justice also questioned whether cameras in courtrooms could have a "deleterious effect on the administration of justice." But before the Florida attorney general could answer, Justice William Rehnquist, a strong advocate of allowing states wide discretion in their own affairs, asked whether there is any constitutional provision forbidding states from adopting rules even if they did have such an effect on justice.

The Supreme Court has ruled once before on the cameras-in-the-courtroom question, overturning in 1965 the conviction of Texas financier Billie Sol Estes on the grounds that excessive television coverage of pre-trial hearings prejudiced his case. But the court stopped short of placing a blanket prohibition on television coverage of all trials, with only four justices -- a minority -- voting to do so.

At the time, Texas was one of only two states that did not follow the ABA camera-prohibiting canon. But since 1976, at least 26 states have instituted programs to allow cameras in courts. Maryland's highest court voted this week to start an experimental program with heavy restrictions.