C3PO's (improbable) creation is featured in the Star Wars films but what about R2-D2? Is there any source (probably outside the films) that explains where he (it) came from and how old he is?
R2D2 was essentially a generic astromech droid. He was purchased as a maintenance droid for the Queen's ship, one of several. He was brand new, one owner, at the start of Phantom Menace. He may have been on the ship for a few months, but not much longer.
His first mention in the Star Wars universe (according to Wookieepedia, which takes into account the Extended Universe) is his appearance in Episode I. R2D2 was basically a standard droid who developed his personality and status over time as he became involved in the major events. Nothing quite so colourful as C3PO's origin story.
Droids in the Star Wars universe are occasionally memory wiped so not to build up personality quirks, this hasn't happened to R2-D2, but it explains why he is unique.
According to LucasFilm Timeline, R2D2 was manufactured just before 32 BBY (Before Battle of Yavin). Manufacturer: Industrial Automaton
Reference of BBY from movie:
1. The Battle to destroy Death Star in Star Wars - A New Hope (Episode IV) is known as Battle of Yavin.
2. The movie story of Star Wars - The Phantom Menace (Episode I) was happened in 32 BBY.
R2D2 is exactly 66 years old, because The Force Awaken happens 34 years after A New Hope, which happens 32 years after The Phantom Menace. It says that he was built right before The Phantom Menace started. So from there we have to count the dates between the movies and there we go.