Environmental light cycles entrain circadian feeding behaviors in animals that produce rhythms in exposure to foodborne bacteria. It remains unclear whether there are corresponding immunological rhythms that anticipate this microbial exposure. Here, we show that the intestinal microbiota generates diurnal rhythms in innate immunity that synchronize with host feeding rhythms. Rhythmic expression of select antimicrobial proteins was driven by daily rhythms in epithelial attachment by segmented filamentous bacteria (SFB), a member of the mouse intestinal microbiota. Rhythmic SFB attachment was driven by the circadian clock through control of host feeding rhythms. Mechanistically, rhythmic SFB attachment activated an immunological circuit involving type 3 innate lymphoid cells (ILC3). This circuit triggered oscillations in epithelial STAT3 expression that produced rhythmic antimicrobial protein expression and caused resistance to intestinal bacterial infection to vary across the day-night cycle. Thus, host feeding rhythms are synchronized with rhythms in intestinal innate immunity that anticipate exogenous microbial exposure.