Viruses have a wide variety of forms and actions. For just about every type of organism from animals to plants to bacteria, there are viruses that infiltrate them. Some viruses attack a broad range of cells; some are specific to specific kinds of cells: tissue tropism defines the set of cells/tissues that a given virus attacks.
Some viruses attack germline cells (those involved in reproduction); some of those (endogenous retroviruses) can insert their own DNA into the germline cell's DNA, which means some viral DNA can end up getting passed on to subsequent generations by the host organism.
Thus we have Human Endogenous Retroviruses (HERVs). The end results could be quite varied. It's feasible that this is the source of much junk DNA (that is, DNA which doesn't fulfill any [known] function in the developmental process). Yet that inserted DNA could be harmful: HERVs are suspected of involvement in a range of auto-immune diseases, including multiple sclerosis.
On the other hand, the recent New Scientist article on viruses (here, called in the print version Welcome to the virosphere) suggests ERVs have also played a crucial positive role in the human immune system's ability to respond to viruses never encountered before.
And HERVs have been linked to gene regulatory networks, which determine which genes are activated and deactivated. Thus they appear to be a key enabler of evolutionary change: "the main difference between closely related species is not in genes themselves, but how they are expressed" (ie whether and when they are activated).
Patrick Forterre, of Paris-Sud University, has been studying DNA mechanisms since the 1970s. His analysis of DNA across the three domains (bacteria, archaea, and eukaryotes [organisms with cellular nuclei, ie most of us]), found disparate DNA-related connections across each pair of domains that weren't present in the other. His ultimate conclusion (see this PNAS article for some of the detail) is that at an early point in the evolution of life there was "a period of wild biochemical experimentation"; innovative mechanisms were shared between different life forms through gene transfer by viruses. Forterre posits numerous alternative life systems, of which all that is left is the three domains, plus remnants of the rest surviving in the virosphere. Given that viruses are more abundant than any other organisms, and gene flow is greatest via viruses, "it should not be a surprise that major innovations could have occurred first in the viral world, before being transferred to cells".
In effect, viruses have been "sharing the successful [biochemical] experiments" - those mechanisms that survived in the DNA being the successful ones. Forterre goes further and credits viruses for many leaps in complexity of life, including development of DNA from RNA, and the key innovation of cell nuclei.
Ultimately, the NS article concludes that as species, we are "leaky vessels" of DNA, and that the biosphere can be seen as one "interconnected network of continuously circulating genes - a pangenome".