Before a person comes to a saving knowledge of Jesus Christ, the Bible says that person is in total spiritual darkness. When one comes to Jesus, that person no longer needs to be in darkness; in following Christ they have the light of life. Therefore, they are instructed to no longer walk in darkness but "as children of light" to walk in the light – the light of Christ and His Word.
Christ says in John 8:12 ...“I am the light of the world. If you follow me, you won’t have to walk in darkness, because you will have the light that leads to life.””
Walking in the light is conditional on following Christ.
The Bible lays out several other conditions for walking in the light:
Walk in His light today.
Bro. Joe Metts