Background Access to safe water and sanitation is considered a basic human right and a focus of the Sustainable Development Goals. However, many water and sanitation interventions do not have long lasting impacts in communities and are generally associated with high levels of failure. Limited information is available to understand what types of interventions work for whom and under what circumstances. Methods A realist review to understand how, and under what circumstances community engagement in water and sanitation interventions impacts access (to safe water and sanitation), change (in health status or behaviour), and sustainability (of resources and services). We systematically searched PubMed, Web of Science and Scopus databases to identify studies from low- and middle-income countries.Results We reviewed 56 studies conducted in 25 countries. We identified five mechanisms that explain access, change and sustainability outcomes: 1) accountability (policies and procedures to hold communities and committees responsible for their actions and outcomes of an initiative), 2) diffusion (spread of an idea or behaviour by innovators over time through communication amongst members of a community), 3) market (the interplay between demand and supply of a service or resource), 4) ownership (sense of possession and control of the service or resource), and 5) shame (a feeling of disgust in one’s behaviour or actions). Contextual elements identified include: community location, communities with similar characteristics, communication, leadership, fines/penalties, seasonality, resource dependency, access to resources and funding, community financial and technical skills and knowledge, leadership, ongoing support and acknowledgement of change, community connectedness and social cohesion, community willingness to pay, committees that followed and understood responsibilities, rules and management plans, active committees with women and community/committee involvement in the design, planning or implementation of the intervention. Conclusion The findings highlight five key mechanisms, impacted by 19 contextual factors that explain outcomes of community-based water and sanitation interventions. Policy makers, program implementers and institutions need to consider community dynamics, location, resources, committees and level of community involvement, prior to the introduction of community-based water and sanitation interventions.