In Lord of the Rings, Saruman The White, the eldest of the Wizards and their chieftain, joins with Sauron instead of helping people fight against Sauron. What is the reason for him losing faith in Gandalf, the Elves and the men and becoming an ally of Sauron?
This is fully explained in the Istari material in Unfinished Tales, with the most direct information being that he:
...fell from his high errand, and becoming proud and impatient and enamoured of power sought to have his own will by force, and to oust Sauron; but he was ensnared by that dark spirit, mightier than he.
This is also expressed in Letter 181:
They were also, for the same reason, thus involved in the peril of the incarnate: the possibility of 'fall', of sin, if you will. The chief form this would take with them would be impatience, leading to the desire to force others to their own good ends, and so inevitably at last to mere desire to make their own wills effective by any means. To this evil Saruman succumbed. Gandalf did not.
So in other words, Saruman started out with good intentions but his pride and eagerness to get a quick result got the better of him.
Lord of the Rings itself makes clear that one of his motives was desire for possession of the Ring, and - when we consider the above quote - it seems evident that this desire was initially as a means of power for the over throw of Sauron, but following his lapse became a desire for his own personal power.
Saruman himself explains it all in Gandalf's story at the Council of Elrond:
A new Power is rising. Against it the old allies and policies will not avail us at all. There is no hope left in Elves or dying Númenor. This then is one choice before you. before us. We may join with that Power. It would be wise, Gandalf. There is hope that way. Its victory is at hand; and there will be rich reward for those that aided it. As the Power grows, its proved friends will also grow; and the Wise, such as you and I, may with patience come at last to direct its courses, to control it.
This also introduces a new dimension that's important in Tolkien's works: the abandonment of hope and giving into despair. Saruman saw no way of winning through direct confrontation and so succumbed to an alternative path that would eventually destroy him.
So that's a combination of the following main factors:
- Seeing no hope in the current approach
- Seeking power to assist
- And being corrupted as a result
Saruman, by the way, comes with a flawed pedigree. He was in origin a Maia of Aule, as was Sauron (they would have probably known each other well before Sauron was corrupted in the Elder Days), and Aule himself had (semi) rebelled against Ilúvatar's will in his making of the Dwarves. There's room for interesting speculation there, but perhaps not appropriate for inclusion in an answer.
Saruman was sent to Middle Earth in order to help the Free peoples defeat Sauron.
In order to fight against Sauron he had to study the powers of the One Ring. When he did, he saw how powerful the one ring was and wanted it for himself. He had begun to sense the resurgence of Sauron and to envy and desire his power, and especially his One Ring.
In T.A. 2851, the White Council met and Gandalf revealed that the evil presence in Dol Guldur was indeed Sauron and that he had returned, and urged an attack there. Saruman however believed that Sauron would be useful in his quest: allowing Sauron to build up his strength, the One Ring would reveal itself, and Saruman hoped to have sufficient strength to seize it first himself until that event. With this strategy in mind, Saruman overruled Gandalf. It soon became clear that Saruman desired to possess the One Ring himself.
-- J.R.R. Tolkien, The Lord of the Rings, Appendix B, "The Third Age"
Simple Answer: He wanted the ring for himself, once he saw how powerful it actually was