Getting written consent is certainly the best way to avoid being surprised by a lawsuit but, as a VERY general rule, it is not illegal to take photos of children at school events (as long as the school or event does not prohibit the taking of photos).
Photographing children who are only incidental to the photo as a whole is the safest photograph to take - such as photos of a group of track runners or a wide angle shot of players on a football field, where no one child is singled out. The type of shots like those taken by photojournalists for magazines or newspapers, of sports players up-close and personal and where the players are recognizable, are ones where you would be wise to obtain consent from the parent, if you intend to market the prints of their child.
You would certainly need the written consent of the parent of a minor, or the consent of anyone who is easily identifiable in a photo, in order to use their image for any advertising purpose. But, depending on who you market your prints to, written permission can also be required for commercial sales.
For the most part (and there are notable exceptions), legal problems come more from how the photos are used than from the actual taking of the photos.
Because a parent could consider any photo taken of their child, especially any photo that is printed, published, or sold, to be an invasion of privacy, you may want to speak with the schools whose events you wish to photograph, to get prior consent to photograph the events. Even the innocent photographing of children at a school event can give rise to suspicions, and may lead to some uncomfortable questioning by parents or authorities, if permission has not been granted prior to the taking of the photos.
So, to answer your question, it depends. Sometimes it is legally necessary to get written permission and other times it is not, but it is always legally WISE to do so.