While sin can happen during any time of the day, human experience confirms that we are tempted to sin more often at night, after the sun sets.
Why is that?
Even Jesus recognized this fact of human existence and offered his own explanation in the Gospel of John.
[T]he light has come into the world, and men loved darkness rather than light, because their deeds were evil. For every one who does evil hates the light, and does not come to the light, lest his deeds should be exposed. But he who does what is true comes to the light, that it may be clearly seen that his deeds have been wrought in God.
While Jesus' words have layers and layers of meaning, he highlights the reality that darkness gives us the illusion that our sinful deeds are somehow withheld from God's sight, just because they might be withheld from human sight.
When darkness covers our part of the world, we are more likely to commit sin, not wanting our deeds to be revealed by the light of the sun.
It's not surprising that many acts of vandalism, robbery, and murder occur at night, when shadows offer "protection."
At the same time, this principle applies to other types of sin, such as accessing pornography or engaging in an adulterous affair. The darkness "consoles" us, making us think that we are not being watched.
However, we do not fool God, who sees us even in the dark.
The next time we find ourselves being tempted after the sun goes down, we should remember the words of Jesus and conduct ourselves as if we were always in the light, exposing all of our works to the light of the Son.