The most common benefit of viruses is Vaccination. Vaccines have directly caused the elimination of several formerly deadly diseases, and made many others a lesser danger to children and the elderly.
Vaccines are normally composed of cultured viruses, injected into the body to prepare the immune system for a full infection. The idea is that by acclimating the immune system to the virus, it will be able to create antibodies and physical conditions -- like a light fever -- that make the body a hostile place for the virus to survive and propagate.
Vaccination was theorized and tested by Edward Jenner in the 1770s, and codified into a practice by Louis Pasteur one hundred years later. Current vaccination methods include dead viruses, disabled viruses, and viral protein coatings (which cause immune response without risking infection). Vaccination continues to be studied and tested with different methods, and despite a recent popular backlash remain the most effective form of treatment for many diseases around the world.
It is possible to create a vaccine out of a non-viral substance that mimics the conditions of the illness, such as Toxoid vaccines, but while these are very successful they are unrelated to viruses.