There are least five Canonical parallels to this Thomas saying. One is Matthew 5:14-16 (in the context of the Sermon on the Mount):
"You are the light of the world. A city that is set on an hill cannot be hid. Neither do men light a candle, and put it under a bushel, but on a candlestick; and it gives light to all that are in the house. Let your light so shine before men, that they may see your good works, and glorify your Father which is in heaven."
The other four are from The Gospel of John, which developed separately from the synoptic sayings source, (although its author was probably aware of the existence of one or more of the synoptic Gospels). There is John 8:12:
"Then spoke Jesus again to them, saying, I am the light of the world: he that follows me shall not walk in darkness, but shall have the light of life."
John 9:5 (Jesus speaking): "As long as I am in the world, I am the light of the world."
And John 12: 35-36 (in the context of Jesus predicting his Crucifixion):
"Then Jesus said to them, Yet a little while is the light with you. Walk while you have the light, lest darkness come on you: for he that walks in darkness knows not where he goes. While you have light, believe in the light, that you may be the children of light."
The theme of light is central to John, and further references could be found. Note especially the famous beginning of John's Gospel (John 1:1-5):
"In the beginning was the Word, and the Word was with God, and the Word was God. He was in the beginning with God; all things were made through him, and without him was not anything made that was made. In him was life, and the life was the light of men. The light shines in the darkness, and the darkness has not overcome it."
If the earlier date for Thomas is correct, it is not impossible that that the Thomas community was responding to John's assertion about Jesus himself being the light (as opposed to the light being in those who understand the teachings of Jesus). Of course, it's equally possible that John was responding against the the Thomas community's beliefs by asserting that Jesus himself was the light, and that a personal with one's Savior was necessary for salvation.
Whichever was the case (and of course, it could have been both), the Thomas version of the saying seems indebted to Matthew's: "You are the light of the world." But theologically there are critical differences. By placing the saying in the Sermon on the Mount, Matthew is making its audience the multitude below, that is, the people of Israel. What is at issue in Matthew's version of the saying is the redemption of Israel. Hebrew Prophets in the Babylonian exile had foretold a future Israel that would hold sway among other nations and was described as a kind of paradise on earth. That hadn't happened at all, but Jesus' message (per Matthew) was that it was going to become a reality after all. Those who listened to him needed to understand that they had been chosen by God as a light to the nations in the Peaceable Kingdom to come. Israel needed to emerge from the dangerous obscurity in which it presently found itself. The city on the hill (Mt. Zion, from which the New Israel would emanate) could not but shine forth. Regardless of what Jesus' vision had been, that was how the author of Matthew had seen things.
But the Thomas community had looked at it differently than Matthew or John. For Thomas, the light that "shines on the whole world" is "within a person." It does not come from Mt Zion or from a personal relationship with Jesus except insofar as Jesus' mind can be internalized by meditation on his sayings. And as we have seen from the start with this gospel, it is only the one who "discovers the interpretation of these sayings" who "will not taste death." This is Thomas' sotorology. For those to whom "the light does not shine, it is dark." Just as John required rebirth into Jesus Salvation, Thomas required enlightenment Into his mind. Neither was an all embracing, all-tolerant position. But at least John's version of Salvation was open to any who sought it.

