Cancer cells can be and are used in cell culture. HeLa cells were the first human cell line to be grown in culture and they were derived from a cervical tumor.
That being said, Cancer cell lines would not _necessarily_ be used for stem cell work. They have sustained too many mutations to study the type of questions that stem cells are used to study, _though as MattDMo points out, teratomas, tumors that originate from stem cells, can be used in stem cell research as a model for Stem Cells in culture_. Also, they could never be used for therapeutic purposes.
As for viruses, HeLa cells were used by Jonas Salk to develop the polio vaccine, so cancer cells are used in viral research.
**_Edits in italics._**