The Jedi Order was founded in 25,783 BBY, and their philosophies -- such as the distinction between the light side and dark side of the Force -- developed over the next few centuries. They served as the guardians of the Republic since its foundation. It wasn't until around 4,000 BBY, however, that the Jedi began to forbid marriage and attachment.
Practically speaking, this is due to the structure of the Expanded Universe. Before the Prequels came out, EU writers had to avoid the Prequel Era so as to avoid contradictions with later material. For the most part, the EU covered events in between the Original Trilogy movies and after Return of the Jedi. In order to explore new time periods and characters, works like Knights of the Old Republic were set 4,000 to 5,000 years before A New Hope and featured Jedi marrying with no problem. When the prohibition of marriage was revealed in Episode II, it only made sense in the EU if it started after 4,000 BBY.
In-universe, the new rule prohibiting marriage is justified by changes in the structure of the Jedi Council and Jedi Order. Before 4,000 BBY, the Jedi Order was made up of loosely affiliated local groups. After the Great Sith War, they became a unified organization under the Jedi High Council, which began to reinterpret the Jedi Code. Among the new regulations were the prohibition of marriage and the idea that Jedi must begin their training as very young children.
Source: http://scifi.about.com/od/starwarsglossaryandfaq/a/Star-Wars-FAQ_Why-Cant-Jedi-Marry.htm
Another difference in the portrayal of the Jedi pre- and post-1999 is the existence of Jedi families. During the <PERSON> era, it was established that Jedi could marry and have families, and several of the characters were the descendants of Jedi Knights, including <PERSON> (Dark Empire II; <PERSON>, 1994) and <PERSON> (I, Jedi; <PERSON>, 1998). <PERSON> had a spouse named <PERSON>, and the Imperial warship Eye of Palpatine was meant to attack Belsavis, a planet housing the children of Jedi Knights (Children of the Jedi; Hambly, 1995). 503
Jedi of the Old Republic during the Sith Era also had families; <PERSON> and <PERSON> were married and had a daughter, <PERSON> (Tales of the Jedi: The Saga of Nomi Sunrider; Veitch, 1993). Then, Episode II firmly established the idea that Jedi could not marry nor have children, due to the risks of falling to the Dark Side associated with attachment to your spouse/offspring. Also, according to <PERSON>, Jedi were not permitted to have children to avoid creating Jedi family dynasties, which would have undue influence in the Order (I think this was from Destiny’s Way; <PERSON>, 2002). As a result, retcons were required. <PERSON> had his son <PERSON> without the permission of the Jedi Council, and so was severely reprimanded (The New Essential Guide to Characters; <PERSON>, 2002). There were two interpretations of <PERSON> circumstance. Either <PERSON> had special dispensation to have his son <PERSON> (who became <PERSON>, <PERSON>’s father) due to cultural considerations (Elusion Illusion; <PERSON>, 2003) or <PERSON> married and had a child without permission, keeping it hidden from the Jedi Council (Jedi Trial; Sherman and Cragg, 2004). Ultimately, any Jedi offspring dating from that era (such as <PERSON>) could be explained by the child being conceived with special dispensation from, or against the will of, the Jedi Council. <PERSON> and <PERSON> were members of <PERSON> Jedi sect, which allowed marriage (Order 66; <PERSON>, 2008). The children of the Jedi located on Belvasis were retconned into being Apprentices and Padawans, not offspring (The New Essential Guide to Characters; <PERSON>, 2002). Last, issue 23 of Knights of the Old Republic established that there was a shift in Jedi thinking following the Great Sith War (<PERSON>, 2007). Jedi would continue to have relationships and families for some years; Grand Master <PERSON> had a son, <PERSON> (The Old Republic 7; <PERSON>, 2011), but by the time of the Ruusan Reformations, the Jedi Order would ban marriage and conception.
source: http://www.eucantina.net/archives/11067 605