How does Satan know what to tempt us with? He is not God, so how does he know what tempts us?
The simple answer is he doesn't know. He makes guesses and is sometimes wrong. You can see this when Satan attempted to bring down Job. "So Satan answered the LORD and said, "Does Job fear God for nothing? Have You not made a hedge around him, around his household, and around all that he has on every side? You have blessed the work of his hands, and his possessions have increased in the land. But now, stretch out Your hand and touch all that he has, and he will surely curse You to Your face!"" (Job 1:8-11). Notice the confidence Satan has that Job would turn against God, yet he was wrong. "In all this Job did not sin nor charge God with wrong" (Job 1:22).
So Satan tried a different tactic. "Then the LORD said to Satan, "Have you considered My servant Job, that there is none like him on the earth, a blameless and upright man, one who fears God and shuns evil? And still he holds fast to his integrity, although you incited Me against him, to destroy him without cause." So Satan answered the LORD and said, "Skin for skin! Yes, all that a man has he will give for his life. But stretch out Your hand now, and touch his bone and his flesh, and he will surely curse You to Your face!"" (Job 2:3-5). Again Satan was wrong. "In all this Job did not sin with his lips" (Job 2:10).
Satan uses the same approach advertisers use. They don't know who will buy their wares, so advertisers blanket the region with multiple ads, hoping that a percentage will buy. Satan does much the same: flooding the world with temptations, hoping to get nibbles -- and he is quite successful. For the most part, his effort is keeping the world in general in sin, but he especially focuses his attacks on those over whom he has lost control. "Be sober, be vigilant; because your adversary the devil walks about like a roaring lion, seeking whom he may devour. Resist him, steadfast in the faith, knowing that the same sufferings are experienced by your brotherhood in the world" (I Peter 5:8-9).
This is why there are times when the opportunity to sin arises, but it doesn't tempt you; it is easily overcome. But at other times a temptation arises that isn't so easily ignored and you feel that you had to battle it with all your strength.