The mature lymphocyte population of a healthy individual has the remarkable ability to recognise an immense variety of antigens. Instead of encoding a unique gene for each potential antigen receptor, evolution has used gene rearrangements, also known as variable, diversity, and joining gene segment (V(D)J) recombination. This process is critical for lymphocyte development and relies on recombination-activating genes-1 (RAG1) and RAG2, here collectively referred to as RAG. RAG serves as powerful genome editing tools for lymphocytes and is strictly regulated to prevent dysregulation. However, in the case of dysregulation, RAG has been implicated in cases of cancer, autoimmunity and severe combined immunodeficiency (SCID). This review examines functional protein domains and motifs of RAG, describes advances in our understanding of the function and (dys)regulation of RAG, discuss new therapeutic options, such as gene therapy, for RAG deficiencies, and explore in vitro and in vivo methods for determining RAG activity and target specificity.