Social insects are an excellent model system for a deeper understanding of the mechanisms of longevity determination because they have a caste system in which the same genome, due to the differential gene expression, can produce both a short-lived worker and a long-lived queen. For example, in the honeybee, Apis mellifera, queens develop from fertilized eggs that are genetically not different from the eggs that develop into workers. They have, however, a much larger size and specialized anatomy, develop substantially faster and live much longer than worker bees. In many social insects including bees, ants, wasps, and termites, queens and workers show up to a 100-fold difference in lifespan, with reproductive queens having longer longevity than non-reproductive workers. Caste differentiation in social insect species is known to be dependent on the larval nutritional environment. In the honeybee, the caste switching is determined by distinguished feeding of larvae. There is accumulating evidence that queen phenotype is driven by epigenetic mechanisms of gene regulation. Dietary differences during the larval development have been found to lead to differential DNA methylation. This results in caste-biased patterns of gene expression, which, in turn, leads to caste-biased phenotypes, such as short-lived workers and long-lived queens. The investigation of physiological, biochemical and molecular aspects of the biology of queens and workers seems to be a promising way to identifying pathways that control longevity and to developing the treatments designed to influence these pathways.