There are several excellent commentaries on this passage, I want to share two; one from Matthew Henry, one from A.W. Pink.
We will start with M. Henry...
1. We are here taught, that there is such a thing as heart-adultery, adulterous thoughts and dispositions, which never proceed to the act of adultery or fornication; and perhaps the defilement which these give to the soul, that is here so clearly asserted, was not only included in the seventh commandment, but was signified and intended in many of those ceremonial pollutions under the law, for which they were to wash their clothes, and bathe their flesh in water. Whosoever looketh on a woman (not only another man's wife, as some would have it, but any woman), to lust after her, has committed adultery with her in his heart, Mat_5:28. This command forbids not only the acts of fornication and adultery, but, (1.) All appetites to them, all lusting after the forbidden object; this is the beginning of the sin, lust conceiving (Jam_1:15); it is a bad step towards the sin; and where the lust is dwelt upon and approved, and the wanton desire is rolled under the tongue as a sweet morsel, it is the commission of sin, as far as the heart can do it; there wants nothing but convenient opportunity for the sin itself. Adultera mens est - The mind is debauched. Ovid. Lust is conscience baffled or biassed: biassed, if it say nothing against the sin; baffled, if it prevail not in what is says. (2.) All approaches toward them; feeding the eye with the sight of the forbidden fruit; not only looking for that end, that I may lust; but looking till I do lust, or looking to gratify the lust, where further satisfaction cannot be obtained. The eye is both the inlet and outlet of a great deal of wickedness of this kind, witness Joseph's mistress (Gen_39:7), Samson (Jdg_16:1), David, 2Sa_11:2. We read the eyes full of adultery, that cannot cease from sin, 2Pe_2:14. What need have we, therefore, with holy Job, to make a covenant with our eyes, to make this bargain with them that they should have the pleasure of beholding the light of the sun and the works of God, provided they would never fasten or dwell upon any thing that might occasion impure imaginations or desires; and under this penalty, that if they did, they must smart for it in penitential tears! Job_31:1. What have we the covering of the eyes for, but to restrain corrupt glances, and to keep out of their defiling impressions?
This forbids also the using of any other of our senses to stir up lust. If ensnaring looks are forbidden fruit, much more unclean discourses, and wanton dalliances, the fuel and bellows of this hellish fire. These precepts are hedges about the law of heart-purity, Mat_5:8. And if looking be lust, they who dress and deck, and expose themselves, with design to be looked at and lusted after (like Jezebel, that painted her face and tired her head, and looked out at the window) are no less guilty. Men sin, but devils tempt to sin.
2. That such looks and such dalliances are so very dangerous and destructive to the soul, that it is better to lose the eye and the hand that thus offend then to give way to the sin, and perish eternally in it. This lesson is here taught us, Mat_5:29, Mat_5:30. Corrupt nature would soon object against the prohibition of heart-adultery, that it is impossible to governed by it; “It is a hard saying, who can bear it? - M. Henry
Here is A. W. Pink's writings...
The ancient rabbis, echoed by the Pharisees, restricted the scope of the seventh commandment to the bare act of unlawful intercourse with a married woman. But they should have perceived, as in the case of the sixth commandment, that the seventh spoke specifically of only the culminating crime, leaving the conscience of the hearer to infer that anything which partook of its nature or was calculated to lead up to the overt deed was also and equally forbidden, even the secret thought of unlawful lust. That the Pharisees did narrow the meaning of the seventh commandment to the mere outward act of impurity is evident from our Lord's contrastive exposition of it in the next verse, where He insists that its true intent had a much wider scope, reaching also to the inward affections, prohibiting all impure thoughts and desires of the heart.
Once more we are shown the vast difference there is between the spiritual requirements of a holy God and the low standard which is deemed sufficient by His fallen creatures. The religion of carnal and worldly men is merely political; so far as good and evil affect society, they are in some measure concerned; but as to the honour and glory of God, they have no regard. So long as the outside of the cup and of the platter be clean, they are indifferent to whatever filth may exist within (Matthew 23:25, 26). So long as the external conduct of its citizens be law-abiding, the State is satisfied, no matter what iniquity may be seething in their minds. Different far is it with the Judge of all the earth: "The Lord seeth not as man seeth; for man looketh on the outward appearance, but the Lord looketh on the heart" (1 Sam. 16:7). That which the world pays no attention to, God regards as of first importance, for "out of the heart are the issues of life" (Prov. 4:23). It is only "the pure in heart" who shall ever see-commune with and eternally enjoy-God (Matthew 5:8).
Ere passing on, a few words need to be said on the special heinousness of this particular crime. Adultery is the breach of wedlock. Even the Pharisees did condemn it, for though they made light of disobedience to parents (Matthew 15:4-6), yet they clamored for the death of the woman guilty of this sin (John 8:4, 5). The grievousness of this offence appears in that it breaks the solemn covenant entered into between husband and wife and God, it robs another of the precious ornament of chastity, it defiles the body and ruins the soul, it brings down the vengeance of God upon the posterity, which Job called "a fire that consumeth to destruction" (31:12). "Be not deceived; neither fornicators, nor idolators, nor adulterers shall inherit the kingdom of God" (1 Cor 6:9, 10). "Whoremongers and adulterers God will judge" (Heb. 13:4).
"But I say unto you, That whosoever looketh on a woman to lust after her, hath committed adultery with her already in his heart" (v. 28). Here we have an exposition of the seventh commandment by the supreme Prophet of God, wherein He reveals the height, depth, and breadth of the spirituality of the Divine Law. That commandment not only forbids all acts of uncleanness, but also the desire of them. The Pharisees made it extend no farther than to the outward and physical act, supposing that if the iniquity was restricted to the mind, God would be indifferent. Yet their own Scriptures declared, "If I regard iniquity in my heart, the Lord will not hear me" (Ps. 66:18), and Christ here made it known that if a man allows himself to gaze upon a woman till his appetites are excited and sexual thoughts are engendered, then the holy Law of God judges him to be guilty of adultery and subject to its curse; and if he indulges his licentious imagination so as to devise means for the gratification thereof, then is his guilt that much greater, even though providence thwart the execution of his plans.
Our Lord here declared that the seventh commandment is broken even by a secret though unexpressed desire. There is, then, such a thing as heart adultery-alas, that this is so rarely made conscience of today. Impure thoughts and wanton imaginations which never issue in the culminating act are breaches of the Divine Law, All lusting after the forbidden object is condemned. Where the lascivious desire is rolled under the tongue as a sweet morsel, it is the commission of the act so far as the heart is concerned, for there is then lacking nothing but a convenient opportunity for the crime itself. He who weighs the spirits judges the going out of the heart after that which is evil as sin, so they who cherish irregular desires are transgressors of the law of impurity.
"But I say unto you, That whosoever looketh on a woman to lust after her, hath committed adultery with her already in his heart." ft is not an involuntary glance which constitutes the sin, but when evil thoughts are thereby prompted by our depraved natures. The first step and degree, then, of this crime is when lust stirs within us. The second stage and degree is when we deliberately approach unto-a feeding of the eye with the sight of the forbidden fruit, where further satisfaction cannot be obtained. Then if this lust be not sternly mortified, the heart swiftly becomes enthralled and the soul is brought into complete bondage to Satan, so that it is fettered by chains which no human power can break. Such was the deplorable condition of those mentioned by the apostle, "Having eyes full of adultery, and that cannot cease from sin" (2 Pet. 2:14).
By clear and necessary implication, Christ here also forbade the using of any other of our senses and members to stir up lust. If ensnaring looks be reprehensible, then so much more unclean conversation and wanton dalliances, which are the fuel of this hellish fire. Again, if lustful looking be so grievous a sin, then those who dress and expose themselves with desires to be looked at and lusted after-as Jezebel, who painted her face, tired her head, and looked out of the window (2 Kings 9:30)-are not less, but even more guilty. In this matter it is only too often the case that men sin, but women tempt them so to do. How great, then, must be the guilt of the great majority of the modern misses who deliberately seek to arouse the sexual passions of our young men. And how much greater still is the guilt of most of their mothers for allowing them to become lascivious temptresses.- A. W. Pink
Pink doesn't hold back does he?! Praise God he doesn't. As we see the world sliding further and further into decay, may we continue to rightly divide God's truth, and stand firm on that truth. It will only get more difficult from here on out...