Group B Streptococcus (GBS), is the leading cause of invasive disease and neonatal deaths globally. While critical for developing vaccines and diagnostics, bacterial genetic variation that predisposes neonates and adults to invasive GBS disease remains poorly understood. Here, we address this critical knowledge gap using population genomics by applying genome-wide association studies to an extensive collection of invasive disease and asymptomatic carriage GBS isolates (>20,000) to identify distinguishing genetic features and specific individual pathogenicity loci associated with GBS disease. Using independent and combined datasets from different countries, we show that the genetic variation of GBS explained >90% variation in both neonatal and adult disease status demonstrating a strong genetic basis for GBS infections. Next, we identified several specific individual loci in genes encoding proteins of diverse functions, which were differentially overrepresented in GBS from invasive disease compared to carriage in both adults and neonates. The distribution of these genetic variants varied across geographical contexts, reflecting differences in GBS disease risk across human populations. Furthermore, integrating the genetic variants into a machine learning model revealed additional key features predictive of the neonatal and adult GBS carriage and disease status. These findings demonstrate that GBS genetics critically influences the development of invasive disease in neonates and adults, which may help to inform experimental studies of GBS pathogenicity and the development of diagnostic biomarkers for monitoring carriage of hyper-pathogenic strains in pregnant women prior to delivery for enhanced clinical decolonisation and monitoring, and prompt treatment to prevent invasive neonatal infection and adverse outcomes.