Schools in a zombie apocalypse are medium-risk, medium-reward location.
Some schools in the United States are fitted with gates and perimeter fences to prevent children getting out, but could be used to keep zombies out. Due to height differences high schools will naturally have higher fences and gates, so they are preferred. Larger schools can allow for a better overview of the local area, and the roof could be an excellent spot for snipers.
Objects such as desks and chairs make excellent barricades. Many schools contain vending machines that dispense things like soda, water, and snack foods. A school's cafeteria can allow temporary food, but conversion of the school's sport field into a farm could allow a long-term food source. Very basic Medical supplies can be found in the nurse's office. The library can also provide a source of entertainment for survivors. Class items like scissors and gym equipment can assist in defending from attacks.
Most scholarship schools have dormitories for those who live far away. Each dormitory has several rooms which can provide housing for several people. Dorms are also typically reinforced for student safety, which could make entry difficult for both those looking to inhabit the dorms and those looking to steal from survivors within.
The textbooks and educations supplies will be helpful in the reeducation of survivors in the case of a long term outbreak. They will also allow survivors to research and answer question they might have as well as fix up their shortcomings to become a jack-of-all-trades.
Depending on the locality, schools with large sports complexes or near large open spaces may be co-opted by government agencies as makeshift hospitals or command centers. These may be filled with the undead or hostile survivors and will very well be a site of interest to all those around.
Schools are generally not built to withstand assaults, so a reasonably well armed group (especially one with explosives) could punch through most defenses. Older schools can also be dreary places that may not be the most well lit after electricity goes out and may be unpleasant to live in long term. Likewise, more modern schools may feature more glass faces, making them less secure in the event of an attack, and would require more resources to make a defendable location.
During the Cold War, many public schools were constructed with fallout shelters in the basement levels - some schools also have generic emergency bunkers for use in case of natural disaster (hurricanes, tornadoes, etc.). Given that this is not an inherent feature of all schools, however, preppers should categorize such locations as "emergency shelters" rather than schools.