No one knows for sure whether certain viruses can raise your risk of developing prostate cancer. Recently, several studies have shown that certain viruses may be more common in men who develop prostate cancer than in those who don't develop it.
One of these viruses is xenotropic murine leukemia virus (also known as XMRV), which for years has been known to cause cancers in mice. Recent research has shown that this virus is more common in men with prostate cancer.
As of yet, there's no way to tell if the virus actually causes prostate cancer or if it's just associated with it.
It's also important to note that many men in these recent studies developed prostate cancer and did not have any strange viruses (such as XMRV). This suggests that, at best, XMRV and other viruses are only part of the answer as to what causes prostate cancer.
Klein EA, Silverman R. Inflammation, infection, and prostate cancer. Current Opinion in Urology. May 2008. Volume 18. Issue 3. 315-319.
Schlaberga R, Choeb DJ, Brown KR, et al. XMRV is present in malignant prostatic epithelium and is associated with prostate cancer, especially high-grade tumors. PNAS. September 22, 2009 vol. 106 no. 38 16351-16356.