Bidens pilosa L., native to South America and commonly used for medicinal purposes, has been understudied at molecular and genomic levels and in its relationship with soil microorganisms. In this study, restriction site-associated DNA markers (RADseq) techniques were implemented to analyze genetic diversity and population structure, and metabarcoding to examine microbial composition in soils from Palmira, Sibundoy, and Bogotá, Colombia. A total of 2,984,123 loci and 3485 single nucleotide polymorphisms (SNPs) were identified, revealing a genetic variation of 12% between populations and 88% within individuals, and distributing the population into three main genetic groups, FST = 0.115 (p < 0.001) and FIT = 0.013 (p > 0.05). In the soil analysis, significant correlations were found between effective cation exchange capacity (ECEC) and apparent density, soil texture, and levels of Mg and Fe, as well as negative correlations between ECEC and Mg, and Mg, Fe, and Ca. Proteobacteria and Ascomycota emerged as the predominant bacterial and fungal phyla, respectively. Analyses of alpha, beta, and multifactorial diversity highlight the influence of ecological and environmental factors on these microbial communities, revealing specific patterns of clustering and association between bacteria and fungi in the studied locations.