Scripture tells us that Jesus was tempted to sin on various occasions. For instance, Luke records his repeated temptations by the devil (Luke 4). And the writer of Hebrews says regarding Jesus that “we do not have a high priest who is unable to sympathize with our weaknesses, but we have one who has been tempted in every way, just as we are—yet was without sin” (Heb. 4:15). However, given Jesus’ moral perfection—the fact that he had no sinful nature and was in fact divine—how can it be said that Jesus was genuinely tempted? Isn’t temptation something that only sinners can experience?
While there are many ways to deal with this, my approach is as follows. First, we need to ask what constitutes a “temptation” and then ask whether a morally impeccable (human) being could satisfy the requirements. As I see it, these are the necessary (and jointly sufficient) conditions for genuine temptation:
1. A situation or context in which a person, S, could physically perform a particular action, X.
2. Doing X would be morally wrong (in this context).
3. S finds X attractive in some sense.
It seems to me that if these three conditions are satisfied, then you have a genuine temptation. Now notice that none of them presuppose that the person tempted is morally imperfect or sinful. In fact, a morally perfect person, even a God-man, could satisfy each of these criteria. And, in the case of Jesus that’s just what we see in several instances when Jesus is tempted in the desert. When, for example, the devil tempts him to “tell this stone to become bread” (Luke 4:3): (1) this is something that Jesus could physically do, (2) doing this would be wrong in this context, and (3) Jesus finds the proposed action attractive (since he is so hungry).
So as with most temptations, the action in question is not categorically wrong (wrong in all contexts) but simply wrong in a certain context. (Compare: extra-marital sex is wrong, though sex within marriage is good and even a marital obligation). So it is not moral imperfection that is a key ingredient for human temptation so much as a particular context, combined with a certain attractiveness and ability to carry out the action.
Note my stipulation of physical ability to do X. The reason I am careful to make this qualification is because I don’t believe it was metaphysically possible for Jesus to sin. Given his divinity, he would never sin. This is what prompts some people to question the genuineness of the temptations of Jesus. But that is to impose an overly strict condition on a definition of temptation. In ordinary human experience, all that is necessary for temptation is the three conditions noted above. So the addition of a further condition (such as that the person tempted must be a sinner or that giving into the temptation must be metaphysically possible) would be superfluous.
This is just a rough sketch of how I would handle this difficult question regarding the temptation of Jesus.