Many organisms inhabiting the interface between land and sea have evolved biological clocks corresponding to the period of the semilunar (14.77 days) or the lunar (29.53 days) cycle. Since tidal amplitude is modulated across the lunar cycle, these circasemilunar or circalunar clocks not only allow organisms to adapt to the lunar cycle, but also to specific tidal situations. Biological clocks are synchronized to external cycles via environmental cues called zeitgebers. Here, we explore how light at night sets the circalunar and circasemilunar clocks of Clunio marinus, a marine insect that relies on these clocks to control timing of emergence. We first characterized how moonlight intensity is modulated by the tides by measuring light intensity in the natural habitat of C. marinus. In laboratory experiments, we then explored how different moonlight treatments set the phase of the clocks of two C. marinus strains, one with a lunar rhythm and one with a semilunar rhythm. Light intensity alone does not affect the phase of the lunar rhythm. Presenting moonlight during different 2-h or 4-h windows during the night shows that (1) the required duration of moonlight is strain-specific, (2) there are strain-specific moonlight sensitivity windows and (3) timing of moonlight can shift the phase of the lunar rhythm to stay synchronized with the lowest low tides. Experiments simulating natural moonlight patterns confirm that the phase is set by the timing of moonlight. Simulating natural moonlight at field-observed intensities leads to the best synchronization. Taken together, we show that there is a complex and strain-specific integration of intensity, duration and timing of light at night to precisely entrain the lunar and semilunar rhythms. The observed fine-tuning of the rhythms under natural moonlight regimes lays the foundation for a better chronobiological and genetic dissection of the circa(semi)lunar clock in C. marinus.