Data surprises the crew when he creates Lal, an android much like himself. Lal choses her gender and appearance, and then is enrolled in classes with the other children on the ship. She does not get along with the other children because the children are frightened of her, so Data buts Lal under Guinan's supervision in Ten Forward. Meanwhile, Data explains to Picard why he views Lal as a child and that this is why he did not ask for permission to create Lal. Picard attempts to explain this to the Federation, but the Federation wishes to force Lal to leave the Enterprise without Data and reside under close scrutiny at a research station. The news makes Lal fearful, and this turns out to be a deadly defect in her construction. Data and the Federation representative attempt to fix Lal, but they cannot. Lal says goodbye to Data. He says that he wishes he could love her back, and she states that she will feel the emotion for the both of them. Then she dies.
Ah, the best episodes always end in someone dying. There are lots of other memorable moments, too, like when Troi says "It's a girl!" and when Data tells Picard that he didn't ask permission because other crew members don't ask permission regarding their procreation. And then there are the scary moments that remind us that androids are not people. Like, when the other children won't play with Lal, or when Data gets excited that Lal can use contractions. The Federation's concern that Lal should grow up in a more restricted environment suddenly seems less crazy when you think of her as an android child with Data's immense strength. What if the first emotion that she had experienced had been anger, kin to fear?
We never get to find out, because naturally TNG can't have Lal stick around as a new character, and they can't have us hating the Federation from taking her away from her daddy, either. I mean, look at how well it didn't work out when they tried to take Dr. Crusher from us. I'm not sure that they're allowed to permanently add or subtract main characters at this point, because we've got enough of them but we also don't know enough about them. So, Lal had to die, and she died because even though she was superior to Data, she still couldn't handle emotions, which were essentially an accident. The upshot of it is that she gets to experience love, which Data wishes that he could.
Which brings up the question that episodes about Data often bring up. What IS emotion, really, and does Data experience any part of it? Isn't the desire to experience love a part of what we call love? What about Data's devotion to Lal, his reading up on parenting and all that effort he put into helping her grow and learn? Data may not experience emotions in his gut the same way that we do, but he's got a part of it down that many humans never understand. For us, our actions are part of the emotion. Actions aren't just born of emotion - they also bolster it. We decide to love, or to continue to love. We reinforce those feelings by choosing to act in a loving manner. At least Data can do that part. He can do the things that a loving parent would do. How long would it take a human child to realize the difference, to understand that Data can't feel love the way humans do? Data's actions would sure look like love on the receiving end.