There are a number of theories floating around about the relation of the Dojutsu in the Naruto universe, however they all fail to effectively explain the origins of the Byakugan and the relationship between the Byakugan, Sharingan, and Rinnegan. Let’s begin with the obvious.
1. It is obvious that all of the Dojutsu are related in some way. This is supported in the manga during the Chunin Exams (http://www.narutobase.net/manga/Naruto/078/13), Tobi's history lession, and Madara’s activation of the Rinnegan.
2. The Byakugan is the weakest of the Dojutsu. The reason for this is that both the Sharingan and the Rinnegan grant their users with many unique and powerful abilities. These abilities include both ninjutsu and genjutsu in addition to the basic visual abilities. The Byakugan on the other hand, only grants its users with a 359 degree field of view (which is comparable to the Rinnegan’s shared vision) and the ability to see through solid objects (the Sharingan has allowed Sasuke to do this to a lesser extent). In other words, the abilities of the Byakugan are purely visual and there are no jutsus directly derived from Byakugan.
So, how are they all related?
I think that over time (centuries of time), the blood of the Elder Son became more and more diluted, and the eyes of younger generations began to lose their power. This eventually resulted in some ancestor of the Byakugan and the Sharingan. Meanwhile the Rinnegan became little more than myth. As the Hyuga clan honed their abilities, their DNA became more concentrated, and the Byakugan became more common within their clan (this is supported by the fact that every Hyuga in the series has the Byakugan). Over time, certain Hyuga likely demonstrated special talent with the Byakugan and began to awaken unique abilities.
The clan that would later become the Uchiha likely took a special interest in such abilities and began a breeding system within their clan. This is supported by the following:
1. Not every Uchiha can awaken the Sharingan.
2. The most powerful members of the clan have historically possessed the most powerful forms of the Sharingan.
3. There seems to be a great deal of experimentation in the history of the Uchiha clan and the development of the Sharingan.
This new bloodline would become more pure with each new generation, gradually awakening more powerful dojutsus until they fully developed the basic Sharingan. This clan would completely splintered from the Hyuga and changed their surname to Uchiha. They would become more renowned for their abilities and begin to challenge the other clans for position and power (supported by the Uchiha/Senju history that we know). With their position in the shinobi world, they would consider themselves the true inheritors of the So6P’s eyes and denounce their relation to the Hyuga. This is also why the Sharingan is said to be derived from the Byakugan while still being more powerful.
Finally, at some point, Madara figured out the secrets of the Sharingan and the relationship between the dojutsu, and this resulted in his activation of the Rinnegan.