Do you think that Jesus ever had an evil thought? If yes then it is not sin because He never sinned, if no then it is sin.
For out of the heart proceed evil thoughts, murders, adulteries, fornications, thefts, false witness, blasphemies:
Isn't it interesting we usually admit that murder is sin, adultery is sin, theft is sin, blasphemy is sin, all coming from the heart and we do not usually say the devil put that in me, but when it comes to thoughts we do not want to think we are as evil as the thought we have had and that we had it because our heart is evil. Many times we justify the thought by claiming some horrid event or other persons sin caused the thought and we want punishment fitting the crime instead of facing the fact that we personally are the one with the problem (an evil heart).
The reason we have evil thoughts is because there is within us an evil part of the heart we have not faced and dealt with. When ever we have such thoughts it should send us to our knees seeking to have our heart cleansed so that thought or any like it should not happen again.
I think we are too quick to blame satan (making excuses) as planting those thoughts in us instead of accepting they are really the truth about our hearts and need attention, confession and repentance. Until we really deal with the real issue, our heart, we are not confessing the sin nor can it be dealt with and overcome.
There is a difference between temptation and sin.
Jam 1:13 Let no man say when he is tempted, I am tempted of God: for God cannot be tempted with evil, neither tempteth he any man:
14 But every man is tempted, when he is drawn away of his own lust, and enticed.
15 Then when lust hath conceived, it bringeth forth sin: and sin, when it is finished, bringeth forth death.
Temptation is when we are enticed. But it does not become sin until we willingly obey it.
An example: I once found a wallet on the sidewalk with several hundred dollars inside it. I looked around, and no one saw me pick up the wallet. At the time I could have used the money. For a moment I thought that I could easily take the money out of the wallet and throw the wallet in nearby bushes. I even remember thinking, "Losers weepers, finders keepers". But I knew it would be wrong to keep the money and so returned the wallet and money to it's rightful owner.
Now, was it sin to think about keeping the money? Was I guilty of stealing the money simply because I was tempted to? I don't believe so. If this were the case, it would actually make sense to keep the money. If I am going to be guilty either way, then I might as well keep the money and profit from it.
The scriptures also tell us to count temptation as joy. If a sinful thought is sin, how could we count it joy?
Jam 1:2 My brethren, count it all joy when ye fall into divers temptations;
3 Knowing
this, that the trying of your faith worketh patience.
4 But let patience have
her perfect work, that ye may be perfect and entire, wanting nothing.
The scriptures tell us to count it all joy when we fall into divers temptations. A temptation is a test of our faith in Christ.
So, in this instance, I passed the test. I was indeed tempted for a moment to keep the money, but I remembered that God would have me return the money and chose to obey him. This is not sin.
So, just because you get an evil thought or temptation does not mean you have committed sin. When you willingly choose to obey the temptation it becomes sin.