Well with some spells I imagine technically you could.
A few uses for spell work I'd consider using them for would either be cursework, or and I think I'd use them particularly, for growth either in personality, or in growth in a more literal sense as in spell work to aid in plant growth and healing.
As far as necromancy goes I can't say exactly as I am not aware how you mean the term.
As in raising the worms? That's not likely to happen.
If you mean by communicating with the deceased, maybe, but I wouldn't consider the use of these with this exactly necessary. Though I suppose possible depending on what you mean by necromancy.
For necromancy you cut their heads and make a ring and ask blessings from death gods to bless the ring and you with their power and help you in your path or you can offer them those death bodies as offering .
If you are looking for what worms might be good for, magically speaking, I would suggest beginning with learning about worms, their function, and maybe even what drives them out of the soil under rain -as how they died can be a reflection of the energies they will represent.
For example, Worms are eaters of decay. They process death into the food and fuel for new life, as their excretion bring fertility to the soil. They also dig beneath the surface, maybe being significant to ideas of the underworld or symbolic of the need to dig beneath the surface of a problem/situation. Where they dig also gains aeration through the tunnels they leave behind, which helps water and air get into the soil and furthering the fertility motif.