BRCA1 and BRCA2 are tumor suppressor genes that encode proteins involved in the repair of DNA damage through homologous recombination. When these genes are mutated, the cell's ability to repair DNA is compromised, leading to increased risk of mutations and cancer development.