We have recently demonstrated that exposure to a suboptimal diet during early development leads to abnormal epigenetic regulation of a promoter-enhancer interaction at the gene encoding HNF-4α, a key transcription factor required for pancreatic β-cell differentiation and glucose homeostasis. In addition, our studies revealed that the suboptimal maternal diet amplifies the age-associated epigenetic silencing of this locus. In this research perspective we discuss these novel findings in the context of the growing list of epigenetic mechanisms by which the environment can affect gene activity and emphasize their implications for the understanding of the mechanistic basis of the development of type 2 diabetes with age.