Biologists are increasingly interested in the ecological and evolutionary factors that influence microbial communities. Yet compared to bacterial communities, our understanding of viral community ecology remains limited. Here, we investigated the factors influencing viral community composition and structure among wild rhesus macaques (Macaca mulatta) in human-modified environments in Bangladesh, focusing on assemblages of picobirnaviruses (PbVs) as a model system. We found that anthropogenic factors—particularly human and livestock densities—were the strongest predictors of viral community composition. Host social structure played a secondary role, shaping viral communities at the group and site levels. Virus-virus associations influenced co-occurrence patterns primarily within individual hosts but their effect became less evident at broader scales. In contrast, individual host traits (age, sex, and physiological stress) and viral phylogenetic relationships had minimal effects on viral co-occurrence. Notably, anthropogenic factors had opposing effects on different PbV taxa: while some viruses were more prevalent in areas with higher human and livestock densities, others were less common, possibly due to their association with wildlife or natural environments. This suggests that macaques may acquire certain PbVs from anthropogenic sources while experiencing reduced exposure to others in human-modified landscapes. Together, these findings reveal the dominant role of environmental and social factors in shaping viral communities, and highlight the hierarchical nature of virus community assembly – with different ecological processes operating at individual, group, and site scales.