But if we walk in the light as He is in the light, we have fellowship with one another, and the blood of Jesus Christ His Son cleanses us from all sin.
— 1 John 1:7
God calls us to walk in the light. Do you know how to do that? What if you don't walk in the light, do you lose your salvation? The answer is straightforward when you let the Bible speak for itself. John clarifies "walking in the light" a little later in his letter.
1 John 2:9 He who says he is in the light, and hates his brother, is in darkness until now. 10 He who loves his brother abides in the light, and there is no cause for stumbling in him. 11 But he who hates his brother is in darkness and walks in darkness, and does not know where he is going, because the darkness has blinded his eyes.
WALKING IN THE LIGHT IS WALKING IN LOVE.
A casual reading of 1 John may leave thinking that walking in the light is staying out of sin, and walking in darkness is sinning. But when you read the whole letter, you see that the author defines his own terms. 1 John does directly address sin, but that's a different issue than walking in the light/love.