Genetics can play a significant role in cancer development. Some people inherit mutations in certain genes that increase their risk of developing cancer. Genetic testing can help identify these mutations and provide information about the risk of cancer, which can be crucial for preventive measures and early detection.