Unlike many ‘common names’, ‘sawfly’ seems pretty straightforward: a fly with a saw or a fly that saws. ‘Saw’ has a good Old Norse-Old English origin, and has been used for saw-like structures on animals at least since the mid-1700s according to the OED (1993 New Shorter version). ‘Fly’ is another good Old English word for any insect that flies. So, presumably some old English person put two and two together and got sawfly. Calling anything but a two-winged dipterous fly a fly really bugs entomologists, but Entomology itself is rather new to English, arriving from France in the mid-1800s according to the OED, long after fly was in general and indiscriminate use.
So, maybe ‘sawfly’ was an old English common name for sawflies, but I’m skeptical. The saw in a sawfly is the ovipositor (‘egg’ + ‘placer’), i.e. the egg-laying organ of an insect, in this case one with two pairs of membranous wings (Hymenoptera). We are most familiar with the hymenopteran ovipositor in the form it often takes in the Aculeata (bees, wasps, ants), a sting. However, the ovipositor may be very conspicuous in other hymenopterons, e.g. the ichneumonid fly, I mean wasp, that Adrian at The Bug Whisperer so beautifully captured a few months ago. One wonders why these are not called drillflies (or share the rude common name that foresters often apply to horntails [Siricidae] that confuses female oviposition into a stump with male sperm transfer).
In any case, sawflies have an ovipositor with a pair of blades that usually have a serrate lower edge and are used to saw a slit and deposit an egg into plant tissue. However, when not in use, sawflies withdraw their saws into the body, the saws are not very large to begin with, and seeing those saw teeth (which one may have to count for a species identification) is easy only under high magnification. So, my hypothesis is that some entomologist dreamed up ‘sawfly’ as a common name. Alas, my New Shorter OED is only the two giant volume edition that I could afford as a young professor and it has no information on the first usage of ‘sawfly’ (nor does the online OED). If I can hold out until 2037, the estimated date for the completion of the 3rd Edition of the full OED, then perhaps I can totter into some library and harass the librarian (presumably a robot by this time) into checking for me.