These viruses' genomes are actually incorporated into those of the wasps, and are thus passed on from mother to daughter. The virus doesn't circulate in the body of the wasp; instead, female wasps' ovaries include a unique type of cell which is specialized to act as a viral replicator, generating and storing virus particles from the relevant sections of the wasp's own genome. When the mother wasp injects an egg into its caterpillar host, she secretes a dose of virus along with it. The virus serves to suppress the host's immune system and physical development, and in some cases also modifies its behavior, in order to ensure a favorable environment for the baby wasp's development.
No one, or at least no one I've yet read, knows of any other example in nature of such a close mutualism. No one knows when or how it evolved, or where Polydnaviridae fits into the larger taxonomy of viruses. It's just a shame they weren't discovered in time for Dan O'Bannon to incorporate them in the screenplay for Alien, which already takes considerable inspiration from the reproductive habit of spider wasps; it'd be a different film, and I think perhaps an even better one, for the inclusion.