H. J. Res. 243, Joint Resolution to amend the pledge of allegiance to the flag of the United States of America, June 7,1954
Francis Bellamy wrote the Pledge of Allegiance for an 1892 Columbus Day school celebration coinciding with the Chicago World’s Fair. Congress recognized an amended version of Bellamy’s words as the official national pledge in 1942 legislation on U.S. flag protocols. In 1954 Congress added the words “under God.”
Records of the U.S. House of Representatives, National Archives and Records Administration

Pledging Allegiance
Citizens of the United States, diverse in their backgrounds and beliefs, are united by adherence to principles of liberty and justice symbolized by the American flag. A pledge written for an 1892 Columbus Day celebration became the official affirmation of national loyalty in 1942 when Congress included it in flag legislation. In 1943 the Supreme Court upheld a citizen’s right to follow individual conscience and beliefs in choosing whether or not to recite this pledge.