The BRCA1 and BRCA2 genes are well-known for their role in increasing the risk of both breast and ovarian cancer. Mutations in these genes can significantly raise the likelihood of developing these cancers. Women with a family history of breast or ovarian cancer are often advised to undergo genetic testing to determine their risk.