Diet has been shown to play an important role in human physiology. It is a predominant exogenous factor regulating the composition of gut microbiota, and dietary intervention holds promise for treatment of diseases such as obesity, type 2 diabetes, and malnutrition. Furthermore, it was reported that diet has significant effects on physiological processes of C. elegans, including reproduction, fat storage, and aging. To reveal novel signaling pathways responsive to different diets, C. elegans and its bacterial diet were used as an interspecies model system to mimic the interaction between host and gut microbiota. Most signaling pathways identified in C. elegans are highly conserved across different species, including humans. A better understanding of these pathways can, therefore, help to develop interventions for human diseases. In this article, we summarize recent achievements on molecular mechanisms underlying the response of C. elegans to different diets and discuss their relevance to human health.