Genomic studies of marine microbes have advanced our understanding of community ecology and the vast array of metabolisms microbes utilize for acquiring energy and nutrients in the ocean. The structure of microbial communities overlying coral reefs have been shown to reflect ecosystem health. For example, algal-dominated reefs are inhabited by more pathogen-like microbes. The objective of my PhD thesis was to use metagenomics to investigate the microbial communities associated with the coral animal (Chapter 2) and coral reefs influenced by different nutrient regimes (Chapter 3) and anthropogenic disturbances (Chapter 4). The Line Island archipelago consists of eleven atolls spanning a latitudinal gradient from 6° north to 11° south. Nutrient concentrations vary across the islands where inorganic nutrient concentrations are approximately five and two-times higher for nitrogen and phosphorus, respectively on Jarvis (located closest to the equator) compared to Kingman and Flint (located furthest north and south). Bacterial metagenomes were constructed from 26 coral reefs to investigate community differences between reefs on uninhabited versus populated Line Islands and the influence of biogeochemistry on community structure. The distribution of microbial taxa was most strongly predicted by the composition of certain benthic functional groups. Where reefs with higher coral cover observed on Islands Malden, Flint, and Vostok were associated with higher abundances of Sphingomonadales. In contrast, Kiritimati reefs which were dominated by turf algae, were associated with higher abundances of Bacteriodetes. The microbial community metabolism on LI reefs was shown to be most strongly influenced by geographic distance from the equator. This grouping of community metabolism based on geographic location occurred despite differences in the distribution of taxa present a reef sites. Distance from the equator is strongly correlated with nitrogen and phosphorus concentrations suggesting that nutrient availability is an important driver for community metabolism on Line Island reefs. Metabolic pathways positively correlated with higher nutrients included conjugative transfer, chemotaxis, nitrate and nitrite ammonification, cobalt-zinc-cadmium resistance, multidrug resistance efflux pumps, and ton and tol transport. Low nutrient availability was correlated with metabolic pathways involved in photosynthesis, such as chlorophyll biosynthesis and photosystems I and II. The results from this study suggest that selection of microbial taxa is based on carbon sources (benthic community composition) and subsequently, specific genes are incorporated for adaptations to nutrient availability in that region. To better understand how microbial community structure changes in response to environmental perturbations, three reefs that had undergone a coral-algal phase shift in response to ship groundings were investigated. The Line Islands are calcium carbonate coral reef platforms located in an extremely iron-limited region of the central Pacific. Therefore it was hypothesized that iron leaching from the shipwreck debris was enabling the benthic algae to outcompete and overgrow the corals. The reefs surrounding the shipwreck debris were characterized by high benthic cover of turf algae, macroalgae, cyanobacterial mats, and corallimorphs, as well as particulate-laden, cloudy water. These sites also have very low coral and crustose coralline algal (CCA) cover and are call black reefs because of the dark colored benthic community and reduced clarity of the overlying water column. A combination of benthic surveys, chemistry, metagenomics, and microcosms were used to investigate if and how shipwrecks initiate and maintain black reefs. Iron concentrations in algae tissue from the Millennium black reef site were 6-times higher than in algae collected from reference sites. Metagenomic sequencing of the Millennium Atoll black reef-associated microbial community was enriched in iron-associated virulence genes and known pathogens. Microcosm experiments showed that corals were killed by black reef rubble via microbial activity. Together these results demonstrate that shipwrecks and their associated iron pose significant threats to coral reefs in iron-limited regions.