The structure and function of fungal communities in the coffee rhizosphere are influenced by crop environment. Because coffee can be grown along a management continuum from conventional application of pesticides and fertilizers in full sun to organic management in a shaded understory, we used coffee fields to hold host constant while comparing rhizosphere fungal communities under markedly different environmental conditions with regard to shade and inputs. We characterized the shade and soil environment in 25 fields under conventional, organic, or transitional management in two regions of Costa Rica. We amplified the internal transcribed spacer 2 (ITS2) region of fungal DNA from coffee roots in these fields and characterized the rhizosphere fungal community via high-throughput sequencing. Sequences were assigned to guilds to determine differences in functional diversity and trophic structure among coffee field environments. Organic fields had more shade, a greater richness of shade tree species, and more leaf litter and were less acidic, with lower soil nitrate availability and higher soil copper, calcium, and magnesium availability than conventionally managed fields, although differences between organic and conventionally managed fields in shade and calcium and magnesium availability depended on region. Differences in richness and community composition of rhizosphere fungi between organic and conventionally managed fields were also correlated with shade, soil acidity, and nitrate and copper availability. Trophic structure differed with coffee field management. Saprotrophs, plant pathogens, and mycoparasites were more diverse, and plant pathogens were more abundant, in organic than in conventionally managed fields, while saprotroph-plant pathogens were more abundant in conventionally managed fields. These differences reflected environmental differences and depended on region.