The Bible says that God is light and in Him there is no darkness (1 John 1:5).
Jesus in His earth-walk declared that He is the light of the world and that whosoever that believes in Him would have the light of life (John 8:12, John 12:46, also John 1:4-5,9). This would be possible because such a one would be recreated in Christ and in His order; Christ Himself being the firstborn, the precursor, mold, and template for others that would follow.
James 1:17-18 says that God is the Father of lights, and of His own will has begotten us. If God is Light, the Father of lights, and He gave birth to us, who, then, are we? This is why Apostle Paul said that we are children of light (1 Thessalonians 5:5), and are thus light (2 Corinthians 6:14; Ephesians 5:8). In Him we live, and move, and have our being. He is light and we in Him are light.
So, what was John talking about in 1 John 2:9 NIV, when he said, “Anyone who claims to be in the light but hates a brother or sister is still in the darkness?”
The above statement was not a threat from John about how a believer could be thrust from light back into darkness, back and forth, depending on their behavior. Instead, he was describing the unbeliever in darkness who makes baseless, boastful claims. Notice that in the verse earlier (verse 8 NLT) where he was talking about the believer he had said “Yet it is also new. Jesus lived the truth of this commandment, and you also are living it. For the darkness is disappearing, and the true light is already shining.” For the believer, the darkness is past and the light now shines.
In fact, in the whole of his first Epistle, John was making a contrast between us and them; the righteous and sinners; those in fellowship with God and those outside of the fellowship; those who have the truth in them and the ones that do not have the truth in them; those in the light and those in darkness. Thus, if you do not make this distinction, you might be taking another person’s prescriptions.
We don’t walk in light to become light. Rather, we walk in light because we are light and we dwell in Light. Light is our nature and our location. Darkness is not compatible with our nature. We do not participate in the unfruitful works of darkness.
We live up to our identity. We walk in light. Awake to this reality, and sin not.