In cancer genomics, strings are used to represent the sequences of nucleotides in DNA and RNA. Researchers analyze these sequences to identify mutations, which can lead to cancer. By comparing the string sequences of cancerous and normal cells, scientists can pinpoint the specific changes in the genome that contribute to cancer.