Why 1950's Batman Had To Go Sci-FiAs has been discussed endlessly in this thread, what this era of Batman is best known for is its heavy emphasis on big, silly sci-fi concepts. Some have assumed this was done to boost ailing sales while others have pointed to the fact that, while sci-fi had wide appeal at the time period, comics had the ability to bring those concepts to life more believably and cost-effectively than television or film. I would add to this a third and (I suspect) far more powerful influence upon this decision: The Comics Code of 1954.
In September of 1954, The Comics Code Authority was formed and issued the following edicts for comic books:
1. Crimes shall never be presented in such a way as to create sympathy for the criminal, to promote distrust of the forces of law and justice, or to inspire others with a desire to imitate criminals.
2. If crime is depicted it shall be as a sordid and unpleasant activity.
3. Policemen, judges, government officials, and respected institutions shall never be presented in such a way as to create disrespect for established authority.
4. Criminals shall not be presented so as to be rendered glamorous or to occupy a position which creates a desire for emulation.
5. In every instance good shall triumph over evil and the criminal punished for his misdeeds.
6. Scenes of excessive violence shall be prohibited. Scenes of brutal torture, excessive and unnecessary knife and gunplay, physical agony, the gory and gruesome crime shall be eliminated.
7. No comic magazine shall use the words "horror" or "terror" in its title.
8. All scenes of horror, excessive bloodshed, gory or gruesome crimes, depravity, lust, sadism, masochism shall not be permitted.
9. All lurid, unsavory, gruesome illustrations shall be eliminated.
10. Inclusion of stories dealing with evil shall be used or shall be published only where the intent is to illustrate a moral issue and in no case shall evil be presented alluringly, nor so as to injure the sensibilities of the reader.
11. Scenes dealing with, or instruments associated with walking dead, torture, vampires and vampirism, ghouls, cannibalism, and werewolfism are prohibited.
12. Profanity, obscenity, smut, vulgarity, or words or symbols which have acquired undesirable meanings are forbidden.
13. Nudity in any form is prohibited, as is indecent or undue exposure.
14. Suggestive and salacious illustration or suggestive posture is unacceptable.
15. Females shall be drawn realistically without exaggeration of any physical qualities.
16. Illicit sex relations are neither to be hinted at nor portrayed. Rape scenes, as well as sexual abnormalities, are unacceptable.
17. Seduction and rape shall never be shown or suggested.
18. Sex perversion or any inference to same is strictly forbidden.
19. Nudity with meretricious purpose and salacious postures shall not be permitted in the advertising of any product; clothed figures shall never be presented in such a way as to be offensive or contrary to good taste or morals
Rule #6 already places a burden on the Batman titles to avoid "excessive and unnecessary knife and gunplay, physical agony." If criminals cannot fire guns, use knives, or otherwise hurt people so as to cause physical agony, then more imaginative threats and means of doing battle would need to replace the mundance crusade against criminal activity. So while there may have already been other reasons to work science fiction into the Batman titles, this edict made resorting to outlandish technological problems and solutions all the more necessary. The Comics Code says nothing about laser ray beams, futuristic potions and antidotes, nor medieval weaponry, just to name a few examples.
But it's rules #4 and #5 that really place a demand on the Batman writers to fill each issue with outlandish premises. Prior to the Comics Code of 1954, writers could always rely upon the colorful Batman rogues gallery to attract readers, and thus they were used frequently. Here is the full list of colorful/costumed villain appearances in 1954 Batman stories:
Detective Comics #203 (January 1954): Catwoman.
Batman #80 (December 1953-January 1954): Joker.
World's Finest Comics #68 (January-February 1954): The Crimesmith.
Batman #81 (February 1954): Two-Face.
Detective Comics #206 (April 1954): The Trapper.
Batman #84 (June 1954): Catwoman.
Detective Comics #209 (July 1954): The Inventor.
Batman #85 (August 1954): Joker.
Detective Comics #211 (September 1954): Catwoman.
Batman #86 (September 1954): Joker.
Detective Comics #212 (October 1954): Puppet Master.
Batman #87 (October 1954): Joker.
Detective #213 (November 1954): Mirror Man.
World's Finest Comics #73 (November-December 1954): The Fang.
And then absolutely zero costumed/colorful nor even basic recurring villains appear in 1955 and beyond (keep in mind that a book cover dated November 1954 was still likely written prior to September 1954, when the Comics Code was published). Memorable villains with a signature appearance and schtick could violate rule #4 by inadvertently coming off as glamorous or worthy of emulation. Even more importantly, rule #5 requires the criminal to be punished for their deeds, which means they have to be captured, sent to jail, and serve out their term without escape or early parole. Portraying them otherwise would suggest the system does not work and that good does not always triumph over evil, two of the cornerstones of the Comics Code. Thus, some of the more popular members of Batman's rogues gallery do get referenced in 1955, but they are never depicted as being "at large," instead presumably all serving out their time in prison.
This is a very long-winded way of explaining that Batman writers no longer had memorable villains to fall back upon because of rules #4 and 5, and that they also couldn't depict street-level crime in too much depth because of rule #6. So what else was Batman left to do but get a crime-fighting dog, travel to the past and future a whole lot, make stupid wagers with Superman, spend entire issues trying to protect his secret identity, and (of course) try to contain the hijinks caused by wayward aliens. Batman had nowhere to go but wild and silly in those early, strictest days of The Comics Code Authority.