Microbiome science is revolutionizing many concepts of plant biology, ecology, and evolution. Understanding plant microbiomes is key to developing solutions that protect crop health without impacting the environment. In this perspective article, we highlight the importance of both the structure and functions of plant-associated microbial communities in protecting their host from pathogens. These new findings have a high potential to aid biocontrol programs and to replace traditional chemical products, guiding the transition towards a sustainable production.