The primary goal of this dissertation is to characterize the factors that shape the distribution and composition of foliar fungal endophytic communities across a tropical landscape. To do so, I have chosen to evaluate communities within a single host tree species, Metrosideros polymorpha (Myrtaceae), across a wide range of environments. In Chapter 2, previously published as Zimmerman and Vitousek (2012) in PNAS, I describe the background and methodology that will be carried through the rest of the dissertation. Sampling broadly across a landscape and sequencing deeply using an amplicon pyrosequencing approach, in this chapter we report high endophyte gamma diversity (more than 4000 fungal OTUs) across a matrix of 13 sites. This high diversity is a consequence of high beta diversity between sites, and we find that this beta diversity to be structured largely by macroenvironmental factors: elevation and rainfall. Chapter 3 extends the study system described in chapter two in order to explicitly account for distance. It does so by incorporating an additional six sites into the design, spanning an 'orthogonal gradient' where elevation and rainfall are held as constant as possible, and distance is varied between sites, from tens to hundreds of kilometers. The primary finding is that while distance does structure communities at these scales, it does so to a much lesser extent than does environmental variation. Chapter 4 focuses on the effects of leaf morphology differences between populations by making use of a common garden of Metrosideros collected from sites across the wet side of the Mauna Loa matrix. The primary finding is that leaf pubescence is a major factor shaping the composition of endophyte communities, even when there is little environmental variation. Chapter 5 moves beyond biogeography to explore how evolution, as well as ecology, may be an important driver of the high endophyte richness across the study system in Hawai'i. It describes the signature of a potential endophyte diversification at high elevation, and proposes that a clade of black meristematic fungi with close phylogenetic affinities to rock-inhabiting ancestors is now living in association with Metrosideros at those sites.