All bee larvae are the same at the time of hatching. But how larvae are fed create the difference between worker bees and queen bee. After hatching all larvae are fed with an equal amount of royal jelly. Then after a few days, only royal larvae continue fed royal jelly. Which help queen larvae to grow faster and develop in mature female bees.
(Source)