I'm in favor of them. Just from a utilitarian standpoint, it helps to be able to demarcate the bounds of a school so that you don't have random people just wandering up throughout the day mistaking a schoolyard for a park and causing disruptions. Moreover, it gives kids the freedom to roam relatively unsupervised during recess/break time without worry of them wandering off somewhere. In densely-populated areas, it's basically a necessity to fence off athletic fields as well to prevent any accidental damage to nearby property if a ball goes flying.
There's a lot that can be done to make school buildings feel less prison like, but a fence is just a fence and is innocuous enough.
Until there's a school shooting and every teacher is expected to be the Good Guy With Gun™.