Dragon eggs were created when dragons reproduced, similar to common-day reptiles.
The dragon residing inside the egg could see, hear and communicate with the world outside the egg.
In the wild, these eggs would hatch only when environmental conditions were stable enough to ensure to a baby dragon's survival. However, when the dragons and elves made peace and established the Dragon Riders, a few eggs were given to the Riders each year. The Riders then cast a spell on the egg, causing it to hatch only when the dragon inside chose a Human or elf who had touched it that they deemed worthy of becoming partner of their heart and mind. If the dragon accepted the person as his or her Rider, the egg would then hatch. Afterward, the person who first made contact with the dragon hatchling (ideally, the one the baby dragon chose as his/her Rider) would be connected to the dragon forever, linked in both the mind and the body. The person had no choice: the dragon and human were connected until the death of one in the partnership.
This special connection was symbolized in two ways: through telepathy and a Gedwëy Ignasia, a shiny silver mark on the location where the rider and dragon first made physical contact (typically on the palm of ones hand).
Dragon eggs resembled stones or jewels (Eragon mistook Saphira's egg for a pretty stone) and contained a dragon that has already grown enough to survive in the outside world. The eggs also matched the color of the dragon inside and were very hard to destroy, as when a trader struck a dagger against Saphira's egg it just bounced off without a scratch and the elves during the Dragon war (Du Fyrn Skulblaka) had to use magic to destroy their eggs. Because of that, they could easily be mistaken for hard, polished rocks. Eggs can vary in size depending on how old and large the mother is. A red and gold egg in the Vault of Souls was almost five feet tall. When Eragon first found Saphira's egg, he was unsure of what it was and he took to Merlock, a trader who visited Carvahall every winter with a group of traders.
Role in the books
After the betrayal, there were only three eggs left: a blue, a red, and a green. These eggs were all in Galbatorix's possession. The blue egg was later stolen by Hefring, but then retrieved by Morzan and stolen again by Brom. It was brought between the Varden and the elves in hopes that it might hatch for someone not loyal to Galbatorix. When Arya was attacked by Durza while bringing the egg to the Varden, she tried to teleport it to Brom in Carvahall. The egg landed in the Spine, close to Eragon who was hunting there. It was originally thought that this happened because Arya had mistaken the son (Eragon) for the father (Brom) but in Inheritance it was discovered to be through the manipulation of the Eldunarí hidden in the Vault of Souls. The egg hatched for Eragon, producing a blue dragon who was later known as Saphira.
The red egg hatched sometime for Murtagh while he was in Urû'baen, the dragon inside being Thorn. Thorn, upon hatching, was forced to be sworn loyal to Galbatorix and his growth was sped by the Eldunarí's power.
The green egg, which remained in Galbatorix's possession, finally hatched for Arya after Galbatorix's defeat in Inheritance. The dragon was named Fírnen and mated with Saphira later.
In Inheritance, the Vault of Souls was found to contain over two hundred dragon eggs, twenty six of which were destined for Riders, the others wild. These eggs were hidden before the Riders were eradicated so that they would not be found by Galbatorix or his followers and forced to hatch. These eggs were guarded by one hundred and forty six Eldunarí, including Vrael's dragon, Umaroth. After Galbatorix's death, Eragon and Saphira took these eggs and relocated to them to the east, beyond Hedarth and where the map cuts off the Edda River, where new Riders would be trained. However, he left two eggs with the elves for the Dwarves and Urgals, so that they would be able to have Dragon Riders for their own races and start an era of unification and peace.