I see that you are missing the word 'Nature's God' This reflects the deist quality of the people who wrote the Declaration of Independence.
Of course, The Declaration is not a legal document. It is a historical docuement, but it has nothign to do with the laws of the U.S.
Also, prayer is not taken out of school. What is taken out of school is the promotion of religion in school BY THE GOVERNMENT. The school district, and the teachers can not impose their concepts of religion on others. This does not mean that the students can not pray. It means that the school district can not impose religion on the students.