Protein products of the BRCA1 and BRCA2 genes play a key role in DNA repair processes carried out by homologous recombination. Maintaining the correct double-stranded DNA structure is important for genome stability and preventing cancer transformation, including uncontrolled proliferation of tumor cells. The BRCA1 protein also plays an important role in controlling cell cycle progression and gene expression, including those genes responsible for individual phases of the cell cycle and chromatin remodeling. The BRCA2 protein also participates in modulating the immune response, including that induced in response to the appearance of cells expressing neoantigens. Germline or somatic mutations in the BRCA1 and BRCA2 genes may be found in many cancers, including in patients diagnosed with breast, ovarian, prostate, or pancreatic cancers. Detection of mutations is an important predictor of response to chemotherapy based on platinum derivatives or poly-ADP ribose polymerase (PARP) inhibitors. This article discusses the most important aspects of molecular diagnostics and indications for olaparib use in the treatment of breast, ovarian, prostate, or pancreatic cancers.