Yes, the verse in question states that while Jesus was still on Earth he said he is the light of the world. But to understand why he could say that, the significance and depth of meaning, we have to look elsewhere in John's gospel, for the verse in question does not tell us why. John's readership already knew the prelude to the arrival of Christ into our world, with regard to light. John first speaks of him as the Word who made everything that was made, adding:
"In him was life; and the life was the light of men, and the light in
the darkness did shine, and the darkness did not perceive it." John
1:4 Y.L.T.
The Word incarnated with the miraculous conception in the virgin Mary's womb, being the man-child born to Mary, Jesus. John the Baptist came to testify to him, "the true Light, which doth enlighten every man, coming to the world" (John 1:9 Y.L.T.) The Baptist stressed that he came to testify to that true Light (which was not himself).
With that in mind, the true Light, who had come into the world, was indeed the light of this sin-darkened world. But darkness does not comprehend that spiritual Light.
It was still 'day' (spiritually speaking) for as long as Jesus was in the world, but after his death, resurrection and ascension, he was no longer walking on this Earth. However, those who believed in his name, receiving him in faith, had that light of life given to them. The light of the gospel began to shine through their witness, exposing the darkness of sin, as 2 Corinthians 4:4 states. They no longer walked in the vanity of minds darkened because of the blindness of their heart (Ephesians 4:18). As Paul explained,
"For ye were once darkness, and now light in the Lord; as children of
light walk ye." Ephesians 5:8 Y.L.T.
In another letter, he said they were to be blameless and harmless, children of God, even though living in a sin-darkened world, shining like stars in the world, holding forth the word of life. (Philippians 2:15-16)
That answers the other question as to what happened regarding this spiritual light, after Christ's ascension.