The Pledge of Allegiance was written in 1892 by Baptist minister and Christian socialist, Francis Bellamy (1855-1931)
The original Pledge was published September 8, 1892, in a children's magazine, "The Youth's Companion."
The Pledge was first used in schools, on October 12, 1892, during Columbus Day observances, organized to coincide with the opening of the World's Columbian Exposition, in Chicago, IL.
The Pledge has gone through several transitions:
1892 - I pledge allegiance to my flag and the Republic for which it stands, one nation, indivisible with liberty and justice for all.
1892-1923 - I pledge allegiance to my flag and to the Republic for which it stands, one nation, indivisible with liberty and justice for all.
1923-1924 - I pledge allegiance to the flag of the United States, and to the Republic for which it stands, one nation, indivisible with liberty and justice for all.
1924 - 1954 - 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.
1954 - Present - 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.
My information came from Wikipedia. More can be found here
If you are as old as I am, you may remember Red Skelton.