Knights of the Old Republic
was a classic [I]Star Wars/I] tale of good versus evil, presented in an exceptional manner.
KOTOR II: The Sith Lords
presented a more ambitious, more mature tale about how what you think is good and what you think is evil may not be as clear-cut as as the typical SW morality would lead its characters to believe.
TSL (with the Restored Content Mod, naturally) is my preferred game among the two, but of course you don't get it without the success of the first one. I love them both, but for different reasons.