Many toxigenic bacteria are lysogenized by viruses that contribute the toxin
genes to the bacteria. Clostridium botulinum is one of these.
Now you may not consider botulism beneficial (most people don't), but recognize
that it has led (in the USA, at least) to Botox injections which is destined to
erase millions of wrinkles from the faces of (mostly) women and is predicted to
produce an entire generation of women with blank expressions on their faces as
a result of the botulinum toxin-induced paralysis of their facial muscles.
I leave it to you to decide whether this is beneficial.
More to the point:
Viruses are often considerd to be agents of small scale evolutionary change:
little packets of genes that can be packaged and moved from organism to
organism or from phylum to phylum and provide a continuous supply of fresh
genetic info to organisms. The similarity of many bacteriophages to plasmids
with respect to their abiltiy to enter and exit the genome and move from
organism to oganism is a prokaryotic example. A bacterial virus may simply be a
plasmid's alternative route of dissemination. I would look to someone with a
working knowledge of genomics for more relevant examples.