Shakespeare's sonnets come up with surprising frequency in Star Trek episodes. Captain Kirk was forced to recite Sonnet 57; here, Captain Picard freely relates the closing couplet of Sonnet 18. In the episode, he does so to indicate the realization he's come to—that someone else's brain has been downloaded into Data's head (So long lives Data's head, it will give life to that second brain). Yeah, I know. Weird.
But that's only the ostensible meaning of the couplet in this context. The more significant part (and the part that's developing into an overarching thesis about Star Trek's Shakespeare use) is that Shakespeare's words allow humanity the opportunity to understand themselves better. In this imaginary, science fiction context, "So long lives this" is wrapped up in the futuristic setting. Shakespeare's words have lived this long; humanity will live this long, too.
Here's the clip; the full sonnet follows it.
Shall I compare thee to a summer's day?
Thou art more lovely and more temperate:
Rough winds do shake the darling buds of May,
And summer's lease hath all too short a date:
Sometime too hot the eye of heaven shines,
And often is his gold complexion dimm'd;
And every fair from fair sometime declines,
By chance or nature's changing course untrimm'd;
But thy eternal summer shall not fade
Nor lose possession of that fair thou owest;
Nor shall Death brag thou wander'st in his shade,
When in eternal lines to time thou growest:
So long as men can breathe or eyes can see,
So long lives this, and this gives life to thee.
Links: A Gateway to Star Trek Information at Wikipedia.