The first schools in America date from the 1600s. Boston Latin School is credited as being the first public school in America and also the oldest existing school. The first laws in the United States making education compulsory, date from this same period, the early 1600s. School records may contain much more than a list of students; many of the registration forms included significant, genealogically valuable information. In Great Britain and Western Europe school records can date back even earlier. In some areas, notably Germany, there are possible school records dating back into the 1500s. See Wikipedia: Compulsory Education.
School records can turn up in an astonishingly variety of locations. The FamilySearch.org catalog returns well over 100 entries for "School" and a search for the keyword "school" in the Ancestry.com Card Catalog returns about 50. There are online databases the specialize in "yearbooks" that have collected thousands of this type of document. On the other hand, finding records from individual schools can be a challenge involving searches in historical societies, public libraries, university libraries and special collections, state archives, local archives, museums and many other locations. I once made a search for records in a school in the Bronx and finally found them stored at the district level.
"School records" is a common category on the FamilySearch Research Wiki. Here for example is an article on American Indian School Records.