Biogenic volatile organic compounds (VOCs) play key roles in coral reef ecosystems, where, together with dimethylated sulfur compounds, they are indicators of ecosystem health and are used as defense strategies and infochemicals. Assessment and prediction of the exchange rates of VOCs between the oceans and atmosphere, with implications for atmospheric reactivity and climate, are hampered by poor knowledge of the regulating processes and their temporal variability, including diel cycles. Here, we measured the variation over 36h of the concentrations of DMSPCs (dimethylsulfoniopropionate (DMSP)-related compounds, namely DMSP, dimethylsulfoxide, acrylate, dimethylsulfide, and methanethiol as dimethyl disulfide) and VOCs (COS, CS2, isoprene, the iodomethanes CH3I and CH2ClI, and the bromomethanes CHBr3 and CH2Br2), in surface waters inside the shallow, northern coral-reef lagoon of Mo’orea (French Polynesia) and 4 km offshore, in the tropical open ocean. Comparisons with concurrent measurements of sea surface temperature, solar radiation, biogeochemical variables (nutrients, organic matter), and the abundances and taxonomic affiliations of microbial plankton were conducted with the aim to explain interconnections between DMSPCs, VOCs, and their environment across diel cycles. In open ocean waters, deeper surface mixing and low nutrient levels resulted in low phytoplankton biomass and bacterial activity. Consequently, the diel patterns of VOCs were more dependent on photochemical reactions, with daytime increases for several compounds including dissolved dimethylsulfoxide, COS, CS2, CH3I, and CH2ClI. A eukaryotic phytoplankton assemblage dominated by dinoflagellates and haptophytes provided higher cell-associated DMSP concentrations, yet the occurrence of DMSP degradation products (dimethylsulfide, dimethyl disulfide) was limited by photochemical loss. Conversely, in the shallow back reef lagoon the proximity of seafloor sediments, corals and abundant seaweeds resulted in higher nutrient levels, more freshly-produced organic matter, higher bacterial activity, and larger algal populations of Mamiellales, diatoms and Cryptomonadales. Consequently, DMSP and dimethylsulfoxide concentrations were lower but those of most VOCs were higher. A combination of photobiological and photochemical processes yielded sunny-daytime increases and nighttime decreases of dimethylsulfide, dimethyl disulfide, COS, isoprene, iodomethanes and bromomethanes. Our results illustrate the important role of solar radiation in DMSPC and VOC cycling, and are relevant for the design of sampling strategies that seek representative and comparable measurements of these compounds.