Happily, Cuban-American relations are brightening: The United States has halted its bullying; Fidel Castro has softened his bombast. It makes good sense, certainly, to restore normal relations with a nation 90 miles off our coast.

All this has produced some euphoric journalism out of Havana - stories about the good life and interviews with a Castro on his best behaviou.

But there is another side to the story, which is hidden from the visitors. We have written dozens of columns about political oppression in dictatorships of both the right and the left. One of our targets has been Cuba.

Castro's prisoners have smuggled letters, affidavits and other evidence to the United States with directions that they be delivered to us. We have checked out their charges, as best we could, with former prisoners. We offered to make a personal inspection of Cuban prisons, if Castro would permit it. We asked Sen. James Abourezk (D-S.D.), who enjoys friendly relations with Castro, to help us arrange a working trip to Cuba. Castro sent back word he didn't want us on his island.

We, therefore, have conducted an investigation from afar. For weeks we have talked to sources who have gone beyond the guided tours in Cuba and to experts who have spent their careers studying Cuban affairs. We can give the details of Cuba's seamier side.

In fairness, Cuba is one of the least repressive of the Communist states. It is, in the words of one informed source, a nation of "passive repression." There is no longer need for brutal tactics. Castro's enemies have either been killed or have been driven off the island; the "counter-revolutionaries" have been put down; his revolution has been institutionalized; a whole generation of Cubans has grown up under his tutelage. Therefore, Castro can now afford to be the benevolent dictator.

It has not always been this way. After he overthrew the cruel dictatorship of Fulgencio Batista, Castro's revenge was equally cruel. Hundreds of Batista's associates were executed outright. In some cases, they were rounded up, trucked to firing ranges, gunned down and bulldozed into mass graves. The executions, of course, were unquestionably popular. Crowds at some public trials jeered the defendants, screaming, "Kill him! Kill him!"

Castro's goons broke up newspaper offices and attacked Catholic churches. The new dictator then began a systematic reorganization of Cuban society. Committees for the Defense of the Revolution were created. They carried out Castro's directives down into city blocks. Other organizations regimented women, farmers and laborers. Youth groups took over children from the first grade through graduation. All these organizations functioned as tools of the government.

With the help of the Soviet KGB, Castro set up security agencies - the DGI concentrating on foreign intelligence and the DSE keeping watch over the natives. Both agencies have a worldwide reputation for effectiveness. Among the Cuban populace, according to one account, "there is a pervasive atmosphere of suspicion that your neighbor belongs to the DSE."

Castro is thus regarded by his vassals with a mixture of fear and adulation. There is no free press in today's Cuba, and no public opposition to Castro's policies is permitted. Those few who dare to criticize suddenly find themselves cutting sugar cane. Anyone who might influence others against Castro winds up in a political prison or forced-labor camp. At the same time, the experts agree that Castro is a mastter showman who would easily win a free election.

When his revolution was young and his grip on the government less secure, his prisons were crammed with Cubans guilty merely of expressing political viewpoints that differed from the dictator's. A decade ago, Castro held some 20,000 political prisoners. This number, according to the best estimates of U.S. analysts, has now been reduced to between 4,000 and 5,000.

They are generally divided into two categories: those who will accept "rehabilitation" and those who will not. Prisoners willing to undergo political indoctrination receive greater privileges and are usually assigned to work farms. After serving two-thirds of their sentences, they can expect to be released.

The hard-core resisters, on the other hand, are kept in maximum security prisons where mere survival becomes a daily goal. Some are herded into "galleries" that sleep as many as 100 prisoners. Others are packed like sardines into narrow, underground cells. Windows are boarded up; there is little ventilation; the heat and humidity are overwhelming.

These underground dungeons are also infested with rats, mice and insects. The daily diet consists of rice and soup. Meat, fish and vegetables are served only rarely. As a result, most of the prisoners are in extremely poor health, and many have lost all their teeth.

Outright physical torture, according to the letters and affidavits smuggled to us, is no common. Occasionally, the prisoners are beaten with clubs and pricked with bayonets. This depends, apparently, upon the mood of the guards.

But the psychological torture can be even more cruel. This is practiced throughout Castro's prison system. Among the recalcitrants, it has resulted in frequent nervous disorders and breakdowns.

This is the sort of brutal repression that President Carter has sworn he will oppose regardless of the consequences. Among many Americans, there is a tendency to overlook Castro's ugly side, because he has been the victim of U.S. excesses. But Fidel Castro is a foe of freedom and an oppressor of human rights, notwithstanding the glowing reports from Havana.