Schools in a zombie apocalypse are medium-risk, medium-reward location.
Some schools are fitted with gates and perimeter fences to prevent children getting out, but could 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 brilliant birds-eye view of the local area, and the roof would 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 will allow a long term food source. A school will regularly have a nurse's office which contains basic medical equipment. 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 (about four: two for years 1-2(male and female), two for years 3-4 (male and female). Each dormitory has several rooms which can provide housing for 2-4 people and in the event there are more dormitories, the unbarricaded dorms can be scavenged for supplies.
If you can get there before zombies take over, a school can have a lot of manpower. Teachers may have skills that can assist your refuge, though Agriculture and Shops teachers are more useful than english, history, or math teachers. Military-preparedness instructors also make great additions to your group. Typically, these are people who have been to the military and should be considered as a valuable group member because of their fitness and combat knowledge. It is important to admit to your group those who you can greatly trust and it is advised to not include "dead weights".
DO NOT add trouble makers to your group, as they will most likely pose a threat in the long run. Similarly to teachers, only coincide with those who you know well and those who will be a potential benefit to your group .
In disasters, people will go look for their family members. This leads to traffic jams and can lead zombies to the school. If the zombies have been in the school's area for days, or even hours you will likely find the school surrounded, if not overrun by a horde of undead. In that case, the school will be filled with zombified children and adults. In more modern schools, doors will have glass in them and rooms will have large windows, easily allowing zombies or bandits to break in. In major disasters, schools are commandeered to serve as hospitals, preventing use as a base.