After a spring in which it was fixated on the distant drama of the Falklands conflict, Britain is now immersed in a summer of security mysteries, mishaps and disasters.

While the events are essentially unrelated, they are joined by a common theme of security failures--failure to prevent today's new spasm of Irish Republican Army terrorism, failure to protect Queen Elizabeth II from an intruder in her bedroom, failure to uncover the secret homosexual life of her police bodyguard and an apparent failure to protect intelligence secrets at the government's center for international eavesdropping.

Any one of these episodes would be serious, but the combination in rapid succession has caused an erosion of confidence in those responsible for security at home.

The main casualty thus far are the police who are being blamed for serious laxness in looking after the queen. Forestalling IRA terrorism in the center of London may not be possible, but allowing a man to accost the monarch in bed and missing the fact that her constant escort was a potential blackmail target is being widely condemned.

"The Black Farce at the Palace," headlined the lead editorial in today's Guardian. "There is about the affair now an air of irrational chaos, infecting all those along the stretching administrative line from the queen's boudoir," the newspaper said.

On Wednesday, Home Secretary William Whitelaw will release a full report on security at Buckingham Palace. It will cover the compounded disregard police on duty showed for security procedures--ignoring alarms and strolling to her bedroom after a second telephone call for help. And it will attempt to explain how the police commander in charge of all royal bodyguards passed an intensive examination of his personal life, which included a long-standing affair with a male prostitute.

Newspapers, opposition political leaders and some voices within Prime Minister Margaret Thatcher's party are demanding retribution. Two senior police officials have already been transferred away from supervision of the palace, and it seems likely that the commissioner of police, the chief of Scotland Yard, Sir David McNee, will be forced to retire. It is certain that the whole palace security structure will be revamped.

There are even calls for the resignation of Whitelaw, who oversees police matters.

The rejoicing last month over the birth of a son to Prince Charles and Princess Diana was a reminder for outsiders of the popularity of the royal family. That police through inefficiency would put their widely admired queen in peril is plainly baffling.

Official handling of the case of the security leak at Britain's general communication headquarters at Cheltenham, although a different sort of issue altogether, is similarly confounding.

Last Thursday, a man named Geoffrey Arthur Prime appeared in court to be charged under Article 1 of the Official Secrets Act. He was accused of providing information which might be directly or indirectly useful to an enemy between Jan. 1, 1968, and Dec. 31, 1981. That period included his employment at Cheltenham, which ended in 1978.

On Friday, government officials passed the word to British reporters that the case represented a serious breach of security at this hub of Britain's worldwide electronic surveillance operation, a highly sensitive enterprise that collaborates closely with the U.S. National Security Agency. The seriousness of the charges against Prime should not be underestimated, spokesmen were authorized to say.

Over the weekend, reports appeared in most British newspapers saying a major spy scandal was about to erupt. The respected London Observer headlined, "Spy Secrets Leak to Russia for 13 Years." Opposition politicians demanded a full accounting from the government.

Today, responding to pressure, Thatcher made a parliamentary statement on the affair and said, in effect, that the press got carried away. All she would add is that any charge under the relevant section of the Official Secrets Act was "serious and must give rise to concern." To say anything beyond that, she went on, might prejudice the coming trial. Later officials passed the word that, for now at least, the only suspect in the case was Prime.

The implication remains that something bad happened at Cheltenham, perhaps related to tapping of computerized secrets. It seems likely that it ended when Prime stopped working there in 1978. He was arrested several months ago on sex offenses and it was that investigation which apparently led to the subsequent charge.

In the absence of further enlightenment, the reported security breach at Cheltenham, like the ones at Buckingham Palace, remains to be explained by those whose job it was to prevent them from happening.