What is he saying?
"Mine eye and heart are at a mortal war, / How to divide the conquest of thy sight;"
It is as if my eye and my heart are debating how to best take in your beauty;
"Mine eye my heart thy picture's sight would bar, / My heart mine eye the freedom of that right."
Each wants to prevent the other from enjoying the sight of you.
"My heart doth plead that thou in him dost lie, / A closet never pierced with crystal eyes,"
My heart claims that the image of you is best stored in it, in a way that physical vision cannot understand,
"But the defendant doth that plea deny, / And says in him thy fair appearance lies."
But my eye says that's not true, it is in your physical appearance that you're best appreciated.
"To 'cide this title is impannelled / A quest of thoughts, all tenants to the heart;"
In order to make the decision, a jury is assembled of thoughts, all of whom are loyal to the heart;
"And by their verdict is determined / The clear eye's moiety, and the dear heart's part:"
And they decide how the argument will be settled:
"As thus: mine eye's due is thine outward part, / And my heart's right, thine inward love of heart."
The decision is that the eye can behold your outward beauty, while the heart has claim to your inner beauty.
Why is he saying it?
Sonnet 46 debates the right of the eye versus that of the heart to the beauty of the fair lord. They are at "mortal war" because each thinks it has the sole claim. This idea is played out in Sonnet 47, as well, when the eye and the heart have reached a truce. The first two lines of the Sonnet 47 report, "Betwixt mine eye and heart a league is took, / And each doth good turns now unto the other." So not only has the war ended, but now the heart calls upon the eye when it wants to see the image of the fair lord, while, "Another time mine eye is my heart's guest."
The idea of the eye, beholding physical beauty, and the heart, the center of emotion and love, as battling over a beloved was common. For instance, Thomas Watson's The Tears of Fancie, written in 1593, discusses this conflict in sonnets 19 and 20. However, in that case no truce is reached; to the contrary, both the eye and the heart suffer for having deprived each other of part of the beloved, as stated in the final couplet of sonnet 19: "So th'one did weepe th'other sighed, both grieved, / For both must live and love, both unrelieved."
In Shakespeare's plays, there are contrasting views as to who should be in the victor in the battle between the eye and the heart. In A Midsummer Night's Dream, Helena believes that love is "blind," taking the part of the heart in this debate: "Love looks not with the eyes, but with the mind; / And therefore is wing'd Cupid painted blind" (I.i.234-7). However, in The Merchant of Venice, Portia sings otherwise. In her song, "fancy" refers to love or infatuation:
"Tell me where is fancy bred,
Or in the heart, or in the head?
How begot, how nourished?
It is engender'd in the eyes,
With gazing fed; and fancy dies
In the cradle where it lies.
Let us all ring fancy's knell
I'll begin it,—Ding, dong, bell." (III.ii.63-71)
Sonnet 46 is dominated by legal terminology, as are many of the fair lord Sonnets. Here, the conceit of two parties dividing the spoils of a conquest in court is used to present the eye and heart's battle over the memory of the fair lord. The heart "doth plead," as if it is in a court of law, while "the defendant doth that plea deny;" the eye is the defendant. The jury, which is "a quest of thoughts, all tenants to the heart," is clearly unfair, since they are all beholden to the case of the heart. Here, "quest" means a body of jurors.
The depths of the heart are described in line 6 as, "A closet never pierced with crystal eyes." The word "closet" was used to mean a chest in which valuable things were stored, or a small private room for praying. The idea of eyes being crystal is common in Shakespeare, and probably stems from the eyes having the nature of a crystal ball, in that one can look into them to learn about a person; or from the idea that sight is figuratively transparant.