With the bombings of Hiroshima and Nagasaki and the Daigo Fukuryū Maru incident still fresh in the Japanese consciousness, Godzilla was conceived as a monster created by nuclear detonations and a metaphor for nuclear weapons in general. As the film series expanded, some stories took on less serious undertones portraying Godzilla as a hero while other plots still portrayed him as a destructive animal.
As a Villain
Godzilla was originaly as dinosaur called Godzillasaurus (revealed in Godzilla vs King Ghidorah 1991), who was then mutated by nuclear testing. He destroyed multiple fishing boats. When investigators arrived on Odo Island, they learned that the native islanders believed the attacks were caused by a sea-god named Godzilla (Japenese name is Gojira), and when the island was attacked by the mutant, the name stuck. Godzilla attacked Tokyo multiple time until he was killed by the Oxygen Destroyer, a powerful weapon created by Dr. Serizawa.
In the later movies, either a second Godzilla exists, or Godzilla survived the oxygen destroyer. In Godzilla, Mothra, and King Ghidorah: Giant Monsters All Out Attack, Godzilla has been dead for years and has become nothing but a legend that some do not believe in, however the sould of those who died in World War II merge and create another Godzilla (reffered to by some as Ghost Godzilla).
As a HeroIn some films, Godzilla becomes the lesser of two evils and saves the world from alien threats, such as King Ghidorah, or human spawned creations, such as Hedorah. When portrayed as a protaginist, Godzilla is either a heroic monster, a (somewhat) caring parent, or animal trying to find it's place in the world as the last of it's kind.
As a hero, Godzilla has gained many allies, such as Anguirus, King Caesar, and Jet Jaguar (just to name a few).