The U.S. Supreme Court ruled in Plyler vs. Doe (457 U.S. 202 (1982)) that undocumented children and young adults have the same right to attend public primary and secondary schools as do U.S. citizens and permanent residents. Like other children, undocumented students are obliged under state law to attend school until they reach a mandated age. As a result of the Plyler ruling, public schools may not:

Deny admission to a student during initial enrollment or at any other time on the basis of undocumented status.

Treat a student differently to determine residency.

Engage in any practices to "chill" the right of access to school.

Require students or parents to disclose or document their immigration status.

Make inquiries of students or parents that may expose their undocumented status.

Require social security numbers from all students, as this may expose
undocumented status. (Adults without social security numbers who are applying
for a free lunch and/or breakfast program on behalf of a student need only
indicate on the application that they do not have a social security number.​)

A school district may not request a student's or parent's social security
number unless it (1) informs the individual that disclosure is voluntary, (2)
provides the statutory or other legal basis for why the district is requesting
the number, and (3) explains how the district will use the number.

Districts are strongly discouraged from requesting social security numbers to avoid any chilling effect that this request may have on the enrollment of students because of their race, color, national origin, citizenship, or immigration status.

Changes in the F-1 (Student) Visa Program do not alter the Plyler obligations to undocumented children. These changes apply only to students who apply for a student visa from outside the U.S.

Finally, school personnel -- especially building principals and those involved with student intake activities -- should be aware that they have no legal obligation to enforce U.S. immigration laws. (U.S. Supreme Court, 1982)

More information:

May 8, 2014 Dear Colleague Letter
U.S. Department of Justice and U.S. Department of Education letter. This letter provides information to SEAs, LEAs, and parents about the requirement to provide all children with equal access to public education at the elementary and secondary level.

Plyler v. Doe, 457 U.S. 202
Wikipedia link. In Plyler v. Doe, the Court found that states must educate children of undocumented immigrants, interpreting the equal protection clause of the 14th Amendment to apply to anyone who lives in the U.S., regardless of citizenship.

Lau v. Nichols, 414 U.S. 563
Wikipedia link. In Lau v. Nichols, the Court found that school districts not providing their limited English proficient students with language-assistance programs were violating Title VI of the Civil Rights Act. Lau v. Nichols mandates special language assistance to all limited English proficient children.