Bioware created the first KotOR, and told a damn good, rousing tale in the traditional Star Wars mould, with the bonus points of allowing the player to be the bad guy. In my opinion, however, Obsidian really knocked the ball out of the park in terms of story when it came to their take on the Star Wars mythos. While not as overtly philosophical as something like Deus Ex, the game has a number of elements to its narrative that not only make it stand above its prequel, but above most RPGs in general. First, the game is a complete and utter skewering of the entire Star Wars mythos. If you're a Star Wars fan at all, and have ever been interested in the ideas and philosophies of the Star Wars universe, this game is worth playing just to see how brutally and effectively it deconstructs practically every element of the classic Star Wars formula, particularly through the comments of the character Kreia. She basically offers an alternative viewpoint that is absolutely withering in how it treats classic Star Wars tropes. The Force is no longer seen as a benevolant, all-encompassing life-force, but as a nefarious, omnipotent will that has an agenda all of its own, and forces all sentient life to live under its tyranny. The Jedi are no longer noble warrior-monks with virtuous temperements, but actual people, capable of jealousy, anger and spite, despite their training. The Sith too are thoroughly skewered: no longer are they portrayed as scheming machiavellian political players with thoughts of creating empires. Instead, they are humans who have been utterly consumed by the passions that help fuel their dark-side powers. They have no agenda or scheme more complicated than inflicting as much pain on others in order to alleviate the pain they feel themselves. In short, every classic aspect of Star Wars is given the Watchmen treatment, and it's worth playing it for that in itself.
Secondly, the game deconstructs not only SW tropes, but the conventions and cliches of the RPG genre itself. Things that are standard in every RPG, such as experience points and party members are brought up as plot points, and shown for the quite frankly terrifying concepts that they are.
Lastly, the game addresses issues of general morality, including the classic debates of whether it is better to help others or get them to help themselves, and the like. It's a long game, and there's a lot of narrative to take in, but I strongly recommend you play it just to see how a videogame can analyse the failings of its own medium and setting, as well as purely for the great characterisation and story.