I've been playing Knights of the Old Republic II, on and off, for about six months. I'm still embarrassingly early in the story, having just arrived at Telos, but a few of the conversations I've had in the game so far made me curious about the way droids are treated in the Star Wars universe.
Droids appear to have some form of artificial intelligence; although some are clearly designed for specific tasks (and are therefore unlikely to have any form of sentience), protocol droids and R2 units (or T3 units in KotORII are capable of dialogue, reasoning, and appear to have strong self-preservation instincts. In the original Star Wars trilogy there's some indication that droids can feel emotions - C3P0 alone shows fear, guilt and happiness in one scene of Episode IV.
It seems a little offputting, then, the speed at which organic characters recommend just reprogramming any personality defects out of droids1. It reminds me of the hospital scene in the Futurama episode "Bendin' In The Wind": faced with a horribly disfigured robot, the doctor's advice to the Professor is simply "I'm sorry, you'll have to get a new one".
And that's not to mention the constant barrage of derogatory language used about droids. Referred to as tin cans, snide remarks about their colour and appearance - I can't think of any species in Star Wars that's as essential to the smooth functioning of the entire galaxy2 that's dismissed as mere equipment.
Is there any expanded universe stuff about droid rights? Have they ever demanded fairer treatment, and have they ever received it?
1 We're obviously supposed to react to their treatment, though; when C-3P0 is blown apart on Cloud City, the music at least implies that a dramatic, terrible thing is happening.
2 Can an X-Wing fly without an R2 unit to perform astronav calculations? During your journey from Peragus to Telos in KotORII, T3 is the only thing keeping your ship on course - after he saved the ship and everyone on it - but he's still belittled and insulted at every turn by your companions.