1Jn 1:7 But if we walk in the light, as he is in the light, we have fellowship with one another, and the blood of Jesus, his Son, purifies us from all sin.
John is not talking about a relative degree of fellowship we have with God, but rather is speaking of mere posers in the Christian community, essentially unbelievers, who by their nature walk in darkness versus those who are genuine born of God who by their nature walk in the light. Notice the correlation between 1John 1:6,7 with the following:
"Do not be yoked together with unbelievers. For what do righteousness and wickedness have in common? Or what fellowship can light have with darkness? What harmony is there between Christ and Belial? What does a believer have in common with an unbeliever?" 1Cor 6:14,15
Jesus said, "I am the light of the world. Whoever follows me will never walk in darkness, but will have the light of life." John 8:12 Alleged "Christians" who are walking in darkness are not followers of Jesus.
One of the effects of walking in the light is the experience of fellowship with other genuine believers. But what is also implied here is that only those walking in the light will have their sins purified by the blood of Jesus. Not that salvation is contingent upon living a certain lifestyle. But rather that living a lifestyle consistent with the Christian faith reveals genuine faith; a faith upon which purification from sin is contingent. If you are not walking in the light, you will not be purified from all sin. This is one of the ideas in 1John.