The purpose of the temptation was not to see if Christ could sin, but to show that He could not sin. The temptation came at a critical time: the beginning of Christ’s public ministry. The temptation was designed to show the nation what a unique Savior she had: the impeccable Son of God. It is also noteworthy that it was not Satan who initiated the temptation but the Holy Spirit (Matt. 4:1). If Christ could have sinned, then the Holy Spirit solicited Christ to sin, but that is something God does not do (James 1:13).
Christ’s peccability could relate only to His human nature; His divine nature was impeccable. Although Christ had two natures, He was nonetheless one Person and could not divorce Himself of His deity. Wherever He went, the divine nature was present. If the two natures could be separated then it could be said that He could sin in His humanity, but because the human and divine natures cannot be separated from the Person of Christ, and since the divine nature cannot sin, it must be affirmed that Christ could not have sinned.
Enns, Paul P. The Moody Handbook of Theology. Chicago, IL: Moody Press, 1989; p 237.