Queen or Worker
Scientific Beekeeping
info@scientificbeekeeping.co.uk
A dietary phytochemical alters caste-associated gene expression in honey bees. Mao et al, 2015
The decision of whether a female egg will become a queen or a worker depends largely on what it is feed during the larval stage and this is decided by the nurse bees. The sooner the decision to produce a queen, after the egg hatchs, the better the specimen will be. Afterr two days the tiny larva will make a poor queen.

After 3 days the queen is fed exclusively royal jelly and no pollen or honey, as is fed to the worker larvae.

Royal jelly, however, has no detectable phenolic acids
Above is the general model of caste differentiation in Apis mellifera from the paper, the link for which is given on the left. Arrows' thickness indicates the relative action levels of the considered factors. Barchuk et al (2007) proposes an explanation of the mechanism in great detail in her paper which features this simplified explanation of caste differentiation. They proposed that the global differential programming of gene expression in the honeybee is controlled by DNA methylation mechanism in a manner similar to epigenetic transcriptional changes inducible by environmental factors in vertebrates (Maleszka et al).

Molecular determinants of caste differentiation in the highly eusocial honeybee Apis mellifera. Barchuk et al 2007