There are a few ways that HIV-1 can influence cancer formation in the host.
First off, it is a retrovirus that will integrate itself into the genome. It can integrate itself in the middle of a tumor suppressor gene, knocking out its function and making it more likely that the cell and its descendents will develop a cancerous phenotype. Similarly, it can integrate into regulatory portions of the genome and amplify the expression of protooncogenes. These are especially important in the establishment of leukemia and lymphoma.
More specifically in the case of HIV, it damages the immune system and prevents some of the normal immunological functions that would help to prevent cancer. Various T-cell subtypes have been implicated in the destruction and control of growing tumors, and these cells would likely be either directly infected by the HIV virus or indirectly by the general immune dysfunction that comes along with HIV infection. Also, as HIV infection begins to show clinically as AIDS, there are a lot of viruses that normally are well controlled that start to get out of hand, such as KSHV which cause cancer.
I'm sure there are dozens of other reasons, but those are the first that come to mind. Hope that helps!
See University of Oxford (2013, November 19). Neanderthal viruses found in modern humans. ScienceDaily. Retrieved November 22, 2013, from http://www.sciencedaily.com /releases/2013/11/131119230442.htm. for the possible connection between reactivation of the ancient ERV (endogenous retrovirus) HML2 family of viruses and cancer and HIV.