I shall tell you briefly about the pledge and the flag.
The flag's origins began with the flags of each of the colonies in "America." Although the colonies were mostly British, they each had a flag which had the same colors and usually a symbol that reminded them of England. On some, the British Union Jack (the flag of England) appeared. The colors were usually red, white and blue. It might not say this in text books, but red and blue were easy colors to make from the dyes the colonists had. The colonists at first feared the Spanish who were gradually moving up from the direction of Mexico and establishing colonies. Flags identified each colony so they would not be mistaken for Spanish settlements.
Then after being exploited by England, the American Colonialists decided to rebel. The Boston Tea party took place, The Declaration of Independence was written, and the war was fought and won by the colonialists. Not all of the citizens of the newly formed United States were in favor or severing ties with England. They were called loyalists. So they wanted to retain some of the symbols and colors of the British flag in hopes of a reconciliation with England. The first flag of the US had the stars scattered all over the field of blue and the thirteen stripes represented the original 13 colonies. I'm not sure if Betsy Ross gets credit for arranging the stars in a circle to represent the creation of "a new constellation." But that is how the first official US flag appeared.
Some people say the white is for purity, blue is for loyalty, and red for valor (Some people might say for the blood shed in battle). But others say the blue represents the sky and the new country is a new constellation.
As the US added states, more stars were added to the flag. When I was a little younger than you, there were only 48 states, so the stars were arranged in 6 rows of 8 stars with the point of each star always up. Later when Hawaii and Alaska became states, 2 more stars were added in the early 1950s.
The Pledge of Allegiance came about to celebrate the 400th year of Columbus arriving in the Americas. It first appeared in a magazine to be copied and sent to all the schools so students could recite it for the celebration in 1892. Everyone thought it was uplifting and began to repeat it at various gatherings. Schools would repeat it at the beginning of every school day. It was a reaffirmation of ones loyalty to the U.S. that is represented by the flag. It further states that the country is a republic and united and cannot be divided. It goes on to say there is to be Liberty and Justice for all citizens of the US. In 1954, the words "under God" were added after "...one nation, under God, with liberty and justice for all." When I was a little girl, I learned the pledge without the words under God. Sometimes, in Room 24 when I was sleepy, and we would say the pledge, I would forget to say "under God." I must have been reverting to my childhood.
I hope this helps.
I also suggest you use the Internet, go to Google and search under US Flag History. I checked it out and they have a lot of good sites that will give you more detailed information.
Evolution of the United States Flag
(c) HWS, 2004