The phrase was created by Jesus as this statement reveals:
Then spake Jesus again unto them, saying, I am the light of the world: he that followeth me shall not walk in darkness, but shall have the light of life.
Here's a further discussion of "light":
That ye may be blameless and harmless, the sons of God, without rebuke, in the midst of a crooked and perverse nation, among whom ye shine as lights in the world;
Here's a further discussion of "darkness":
And the judgment is based on this fact: God’s light came into the world, but people loved the darkness more than the light, for their actions were evil.