I'm told that this is the first good TNG episode, and I can't argue with that. Picard gets to say something meaningful rather than just speeching at a problem until it's solved. Plus Data is saved from a terrifying stalker. There is one huge flaw in the concept of the episode (see The Flaw), but if you ignore that it's pretty good.
The Enterprise visits a starbase where Commander Maddox, a cybernetics expert, wants to copy Data's brain in order to create more androids. Data doubts Maddox has the skills to do the procedure and refuses to participate for his own safety. Maddox uses the command structure to try and forcibly transfer Data. Picard fights the order and Data even resigns from Starfleet. Maddox then claims that as Data is merely property he can simply be requisitioned and doesn't get to make decisions about his own future. Picard convinces a judge to hold a hearing in order to prove Data has the same freedoms as other sentient beings. Due to a lack of legal staff Picard must argue for Data and Riker is forced to argue for Maddox.
Case for the Prosecution (Commander Riker)
What sort of hearing is this where the representative for the defence renders the plaintiff unconscious on the stand?
Case for the Defence (Captain Picard)
Picard asks Data about the objects he packed when preparing to leave the Enterprise. Data explains why he values his medals, a book Picard gave him and a hologram of Tasha. Data reveals that he gave his word to not reveal his relationship with Tasha, but Picard suggests she'd be OK with it in this case. Data simply says they were intimate. I must say I'm curious as to how Picard knows about that.
Louvois rules that Data is a machine, but not property. It's not her place to say whether Data has a soul, he should work it out for himself. She grants him the freedom to choose.
Oh Captain, My Captain
Picard uses his skills to save Data and prove the lieutenant's personhood. The Captain is motivated by his principles, loyalty, friendship and his desire not to lose the most efficient employee he's ever going to have.
Riker: lover, adventurer, middle-management
There's no other legal staff on the starbase and so Judge Louvois forces Riker to represent the prosecution. Riker initially refuses because he's against the idea that Data isn't a person. Louvois says that if Riker won't participate, and try his best, she'll simply decide that Data's a toaster** without a hearing. Riker grudgingly researches for the hearing and constructs a reasonable argument. After the hearing Riker feels ashamed of his part in it, but Data reassures him.
Does Not Compute (Thinks)
What the episode never acknowledges is that Commander Maddox's attitude towards Data is horrifying.
To put it another way: Maddox has been obsessed with Data since they met. He ignores Data's wishes, treats him like an object and plans to hold him, experiment on him and make copies of him against his will. Whenever he and Data have a scene together Maddox stares at him with a weird intensity. Maddox also gets angry when people speak of Data's rights, he claims that Data having rights impinges on his rights.*** One can't help imaging that Maddox's lab is behind a fake wall in a basement somewhere.
Despite the creepiness of the whole situation -which probably goes right over Data's head- at the end of the episode Data says that he would be willing to work with Maddox in the future, when the Commander is better prepared. Of course Data is stronger than a Klingon, so it's unlikely Maddox presented a real threat to him, unless he was able to access his off switch.
Guinan's Hat: purple-ish
Picard shares his concerns about the hearing with Guinan. He fears that the wrong outcome will be disastrous, and not just for Data. Guinan speaks about disposable people, and Picard picks up on the analogy to slavery. In cases like this 'property' is a comfortable euphemism.
Staff Meetings: 3
1) Picard, Riker and Data meet with Commander Maddox to discuss his plans. Data (who knows his own systems better than anyone) asks various technical questions, which Maddox cannot satisfactorily answer. Riker and Picard are both concerned.
2) Picard and Data meet to discuss the situation. Picard doesn't want Data to go, but points out that creating other androids could be beneficial. Data points out that making all sighted officers replace their functioning eyes with visors like Geordi's would be beneficial, but no one asks them to do that.
3) Picard explains to Data that Louvois ruled him property, but Picard is fighting it and making her hold a hearing.
At the start of the episode Riker, Data, Geordi, Pulaski and O'Brien play poker, the first senior crew poker game. Playing cards in the future look disappointingly unfuturistic; they aren't even shiny or holographic or anything. During the game Riker manages to successfully bluff Data. It's something that Data understood in theory, but doesn't have the skills to identify in reality.
This is a fine episode that makes various good points, it's a shame that it's redundant.
The central question (should Data be treated as a person) was answered years before. Data entered the Academy, graduated as a Starfleet officer, served aboard vessels for at least 20 years, rose to lieutenant, and was awarded various medals. Now I'm assuming that replicators don't have ranks, transporters aren't granted service awards, and vacuum cleaners are stored in cupboards not given quarters. Data has been treated as a person ever since he joined the Federation. If he'd been considered to be equipment the entire time then surely he would have been kept in a lab, or a box? No one should have listened to Maddox once he started claiming that a Starfleet lieutenant is an object.
Data tells Riker that he shouldn't be ashamed of his actions at the hearing because his participation helped save Data.
Edited to Add:
Through discussions I have been reminded that just because a group pf people have been granted rights previously, doesn't mean that those in power won't try to take them away for their own convenience. So while I feel the flaw is still something worth raising I hadn't considered the many real-world situations in which the agreed rights of huge numbers of people are threatened or even removed. Data is just one individual, so even in the utopic Federation I guess it makes sense that he is threatened.
* And as Meat Loaf tells us, that ain't bad.
** It's a purposefully silly decision. As anyone who watches BSG will know, Data is far more advanced than a Cylon Centurion.
*** Claiming that other people shouldn't have rights because it inconveniences you pretty much makes you the villain.