The Pledge has an interesting history. A little googling revealed the following.
The original (1892) Pledge:
"I pledge allegiance to my Flag and the Republic for which it stands, one nation, indivisible, with liberty and justice for all."
Congress officially recognized the Pledge for the first time, in the following form, on June 22, 1942:
I pledge allegiance to the flag of the United States of America, and to the Republic for which it stands, one Nation indivisible, with liberty and justice for all.
The phrase "under God" was incorporated into the Pledge of Allegiance on June 14, 1954, by a Joint Resolution of Congress amending § 4 of the Flag Code enacted in 1942.
I pledge allegiance to the flag of the United States of America, and to the Republic for which it stands, one Nation under God, indivisible, with liberty and justice for all.
The salute to the flag also changed. Originally it was like the Nazi salute but with the hand pointing toward the flag. It was changed in WWII to the hand over the heart as we (most of us older folks anyway) are familiar with.