The school and yearbook editors have failed to understand that voluntary, student-initiated speech attributed to no one but the student does not violate the establishment clause of the U.S. Constitution. There was no establishment clause violation prevented by this censorship; the school was wrong to prohibit it.
More detail and mostly uninformed commentary on this issue may be found at the Arizona Republic's website. One commenter appealed to an Illinois federal court case in defense of the school--De La Rosa v. Rock Island School District, where a student's cover artwork included the phrase "God Bless America." The difference is that in that case, the expression was on the cover of the yearbook, implying that the school endorsed the expression.
Ed Brayton points out that a similar case in Michigan was resolved in favor of the student with the help of the ACLU.