The Pledge of Allegiance does not have an official Spanish translation, but a commonly used version is:
"Yo prometo lealtad a la bandera de los Estados Unidos de América y a la República por la cual representa: una nación bajo Dios, indivisible, con libertad y justicia para todos."
Which roughly translates to:
"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."