Both Captain Marvel and Johnny Thunder were golden age characters, each giving form to kids' wish fulfillment. With the former, a young boy says a magic word that summons a bolt of mystical lightning that transforms him into a grown-up super-hero. With Thunder, a young man (but still a child, based on the junior sidekick status afforded him by the JSA mainstays) says a magic word that summons forth a genie (his 'Thunderbolt') that will grant his wishes.
Oddly enough, both debuted in 1940, Captain Marvel in Whiz Comics #1 and Johnny Thunder in Flash Comics #1. Then again, 1940 is certainly on the short-list for the proposed Most Creative Year of All Time special Squiddie award, so perhaps it's not that much of a coincidence.
Contrary to most conventional wisdom, Fawcett Comics did not create Captain Marvel specifically as a rip-off of Superman. Certainly the success of Superman and Batman over at DC instigated new ideas at rival publishers - after all, nothing breeds imitation like success - but the original concept behind what would become Captain Marvel tells a different story.
Bill Parker, supervising editor of Fawcett's movie magazines in 1939, had been tapped to edit the company's new line of comics. His first choice for the lead feature in the first title was to have been a group of six heroes, each with a different power based on Greco-Roman mythology. Executive Director Ralph Daigh exercised his executive directorial powers, however, feeling that a single hero would be better than a group of heroes, and merged them into a single character to be called Captain Thunder.
It's easy to understand why Daigh made this decision. Up until then, no one published team books; all of the features were single heroes. DC hadn't even given Batman a sidekick yet! From Daigh's perspective, if you're a magazine publisher anxious to break into the new field of comic book heroes, the rule of the day is imitation, not innovation.
Captain Thunder appeared only once, in an "ashcan" issue printed solely for copyright reasons. Between that ashcan and the printing of the regular run of what would be the first mass release issue of Whiz Comics, the people at Fawcett changed the name of the hero to Captain Marvel. It seems that no one really knows why the name change took place, although the conspiracy theorist in me wonders whether the goal might have been to confuse audiences and give a certain rival publisher conniptions some twenty-five years down the road.
The contortions of the book title itself are just as entertaining. Fawcett published the ashcan as 'Flash Comics', but had to relinquish the title when DC published their own 'Flash Comics' before Fawcett could come out with the full run of the issue. Their second choice was 'Thrill Comics', which fell before the debut of a book called 'Thrilling Comics'. With 'Whiz Comics', the third time was the charm, and everyone could breathe a sigh of relief.
Fawcett published the adventures of Captain Marvels and the rest of the Marvel Family in various titles until 1952, when Fawcett discontinued their comic book line. Incidentally, this was an economic choice, not one forced on them by the lawsuit from National Comics (now DC Comics) for copyright infringement - a lawsuit for which National lost their initial court test.
National was able to re-file their suit, having gathered new evidence, and Fawcett began to build what would have been a reasonable defence (loads of prior art, for example, with other super-powered characters from mythology and popular fiction doing the stunts that both Superman and Captain Marvel would later emulate). At a certain point, however, Fawcett decided that it was foolish to defend a property that they didn't expect to ever publish again, and settled with National via a cash payout and an agreement to not publish without National's consent.
DC revived the super-hero market just three years later, but Fawcett's hands were tied. They couldn't re-introduce the lynchpins of their heroic line without the permission of a rival publisher.
In an odd twist to the saga, DC acquired the Fawcett line of heroes in the early 1970s, paving the way for a re-introduction of what had been one of the most popular heroes of the golden age of comics.
[Side note: if you think all of this makes for a convoluted history, you should check out the never-ending imbroglio surrounding the rights to the Miracleman properties, a character created initially in Britain as a blatant rip-off of Captain Marvel.]
E. Nelson Bridwell, who edited the Captain Marvel revival series for DC in 1972, finally got a chance to write a meeting between Captain Marvel and Johnny Thunder in the pages of 'Justice League of America', during one of the annual JLA/JSA slugfests. This three part story introduced the Fawcett line of heroes and villains into the DC Multiverse, the climatic scene involving Johnny's Thunderbolt taking the place of the mystical lightning that would normally deliver the Marvel Family's powers to Billy, Mary, and Freddy.
It's one of those really natural comic book meetings that Nelson must have had in the back of his head for years, just waiting for the opportunity to put it on paper.
As a closing note, if you want to check out the golden age stories of both characters for yourself, DC has a sweet line of Archive Edition hardcover books that reprint the old adventures. Captain Marvel is the focus of two volumes of the Shazam! archives and Johnny Thunder appears regularly in the seven volumes of the All-Star Comics archives published so far. They're all in print and available from your local comics retailer and comics mail order outlets. (Here's where I insert a free plug: the folks at the Discount Comic Book Service have been great for me. Tell them I said hello.)