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.
Fonte: link
Another difference in the portrayal of the Jedi pre- and post-1999 is the existence of Jedi families. During the Bantam era, it was established that Jedi could marry and have families, and several of the characters were the descendants of Jedi Knights, including Kam Solusar (Dark Empire II; Veitch, 1994) and Corran Horn (I, Jedi; Stackpole, 1998). Callista had a spouse named Geith Eris, 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). Jedi of the Old Republic during the Sith Era also had families; Andur and Nomi Sunrider were married and had a daughter, Vima (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 Vergere, 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; Williams, 2002). As a result, retcons were required. Ranik Solusar had his son Kam without the permission of the Jedi Council, and so was severely reprimanded (The New Essential Guide to Characters; Wallace, 2002). There were two interpretations of Corran Horn’s circumstance. Either Nejaa Halcyon had special dispensation to have his son Valin (who became Hal Horn, Corran’s father) due to cultural considerations (Elusion Illusion; Stackpole, 2003) or Halcyon 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 Galen Marek) could be explained by the child being conceived with special dispensation from, or against the will of, the Jedi Council. Callista and Geith were members of Djinn Altis’s Jedi sect, which allowed marriage (Order 66; Traviss, 2008). The children of the Jedi located on Belvasis were retconned into being Apprentices and Padawans, not offspring (The New Essential Guide to Characters; Wallace, 2002). Last, issue 23 of Knights of the Old Republic established that there was a shift in Jedi thinking following the Great Sith War (J. Miller, 2007). Jedi would continue to have relationships and families for some years; Grand Master Satele Shan had a son, Theron (The Old Republic 7; Freed, 2011), but by the time of the Ruusan Reformations, the Jedi Order would ban marriage and conception.
fonte: link