Poor Knights of Christ and the Temple of Solomon, also known as "The Knights Templar", was one of twelve religious/military groups formed to battle the growing threat of the Muslims during the time of the Crusades in the 1100's. They were formed by Hugues de Payens and Godfrey de Saint-Omer, under the rule of King Baldwin II of Jerusalem.
At the time it was dangerous for Christians to conduct pilgrimages to Jerusalem, for which King Baldwin granted Christians a piece of territory once thought to have been the place where the Temple of Solomon was once erected; the Al Aqsa Mosque. Hence, the first duty of the group was to protect Christians.
However, their purpose changed and the Knights Templar became a sensational combination of myth, fantasy and even corruption. At first, the members would vow poverty and follow the vision of St. Augustine. Yet, their duty began to be seen as a heroic mission since the Templars were basically guarding the holy land. Having earned the blessings and financial support of the Pope and Kings of Europe, the Templars became the ultimate image of the universal soldier and hero.
In The Da Vinci Code Dan Brown awards the Templars the possession of super powerful church secrets, which is their central contribution to the plot. From the holy grail, to the shroud, there is no object that the Templars have missed to protect. Also, they are portrayed as greedy and uber wealthy protegees of the system, which also adds to the idea of a conspiracy. It is true that the Templars became very rich, that they began to get a rowdy reputation, and that they also awoke the jealousy of many, including some of their patrons. For this reason, they were disbanded sporadically until they became merely a legend of what they really were supposed to be.