All honey-storing insects, from ants to bees, have evolved to to be completely social as well as live in colonies. These insects that store honey can be found within the phylogenetic Order Hymenoptera, with the bees specifically found in the Superfamily Apoidea. From this Subfamily is the Family Apidae from which there are three Subfamilies that demonstrate the diversification of these bees. For example, the Subfamily Meliponinae (stingless bees) went through a long evolutionary period during which five Genera were produced and with that over 500 species of stingless bees emerged. On the other hand, the Subfamily Apinae had a much shorter evolutionary period, thus produced on a single genus called Apis and from which there are nine species of bee.
The bees have existed and evolved on this planet for more than 100 million years. One of the significant evolutionary changes for the bees occurred around 130 million years ago when they became more dependent, and vice versa, on flowering plants. In fact, it is overall believed that the emergence of flowering plants (angiosperms) conjoined with the same period of insect evolution. It was not until around 40 million years ago when the ancestral honey bee emerged. In other words the process of nectar collection and conversion to honey did not take place until around 100 million years after the environmental partnership between bee and plants commenced.
For the next several millions of years to come, specifically within the Cenozoic Era, the bee and honeybee, began to diverge even more and take on more distinct features/behaviors in concurrence with the also adapting environment(s). Towards the end of the Ogliocene Epoch, which dated back to approximately between 23-34 million years ago, is when it was believed that Apis dorsata and Apis florea had diverged as distinct species from the honeybee ancestor. Then between 2.5-5 million years ago, during the Pliocene Epoch, came the honeybees species with more advanced forms of nest buildings, specifically constructing parallel combs, such as done by Apis cerana. In fact, the behavior of cavity nesting evolved from Apis cerana. Furthermore, the cavity nesting honeybee species have likely only existed for only a tenth of the time as the open-nesting species, which are now only found in Asia.
One of the possible first honeybees were the stingless bees that come from the subfamily Meliponinae because it is thought that they were the first to break off from their less social ancestors and in turn develop highly sociable behavior. The oldest species of bee was discovered in 2006, fossilized in amber, and was dated to be 100 million years old. The discovery of this species also established a new family called Melittosphecidae, a name that indicates this species has both wasp and bee features. Thus the finding of this bee supports the theory that wasps were the predecessors from which pollen-dependent bees evolved. It had been discovered in an amber residue in Myanmar and was named Melittosphex burmensis. The small size of the fossil suggests that the early Cretaceous flowers were also small. Through the discovery of this fossil, more can be understood and affirmed about the evolution of bees, especially in regards to the relationship between bees and flowers.