The first line of "Sonnet 130" establishes the poem's broad themes as well as its stylistic pattern. The line is a single, declarative sentence. The line is almost a simile: it compares one thing to another, using the word "like." But it negates the comparison. Instead of saying that the speaker's mistress' eyes are like the sun, the speaker insists that they aren't like the sun. This notion, that the speaker's mistress' body is not like some traditional beautiful object, is fundamental to the poem's consideration of beauty, love and desire.
In this case, the beautiful object is the sun. The speaker invokes the sun because of its physical characteristics: it is bright, brilliant, sparkling. While the line doesn't tell the reader anything about the mistress's eyes, we know that they lack these characteristics: by implication, they might be dark or cloudy. Perhaps her eyes have a dark color; perhaps they are ugly; perhaps they lack the sparkle of a quick wit. But the speaker may also be saying that his mistress's eyes aren't like the sun because no one's eyes are like the sun — and that comparing anyone's eyes to the sun is ridiculous. Because the poem only says what his mistress's eyes are not, the speaker invites readers to make guesses about what her eyes are actually like—and whether this refusal to actually compare her eyes to the sun is an insult or a compliment. That ambiguity and obscurity is key to the poem as it develops.
The meter of the line is also worth noting. As its title suggests, "Sonnet 130" is a special kind of poem called a "sonnet." A sonnet is a tightly organized poem with a specific rhythmic pattern of stressed and unstressed syllables in each of its lines. In Shakespeare's sonnets, each line has ten syllables, with alternating unstressed and stressed syllables (this kind of meter is called iambic pentameter):
My mistress' eyes are nothing like the sun
The line is metrically regular, meaning there are no unexpected shifts in the meter — it's straight iambic pentameter. This regularity suggests a smooth, polished speaker: in control—and maybe showing off a little. It suggests that the rest of the poem will be similarly rigorous and controlled, and that any variations from the metrical pattern of the poem are intentional and significant.