The immediate context is:
“You are the salt of the earth, but if salt has lost its taste, how shall its saltiness be restored? It is no longer good for anything except to be thrown out and trampled under people's feet.—Matthew 5:13 (ESV)
The strong parallels between salt and light in these two sayings suggest that Jesus means the same thing by them. Salt is good because of it's taste. I've accidentally forgotten to add salt to my homemade bread and I can tell you that it makes a huge difference. It's not immediately clear what he means by "taste", but either you have it or you don't.
Just before these sayings are the beatitudes:
“Blessed are the poor in spirit, for theirs is the kingdom of heaven.
“Blessed are those who mourn, for they shall be comforted.
“Blessed are the meek, for they shall inherit the earth.
“Blessed are those who hunger and thirst for righteousness, for they shall be satisfied.
“Blessed are the merciful, for they shall receive mercy.
“Blessed are the pure in heart, for they shall see God.
“Blessed are the peacemakers, for they shall be called sons of God.
“Blessed are those who are persecuted for righteousness' sake, for theirs is the kingdom of heaven.
“Blessed are you when others revile you and persecute you and utter all kinds of evil against you falsely on my account. Rejoice and be glad, for your reward is great in heaven, for so they persecuted the prophets who were before you.—Matthew 5:3-12 (ESV)
I won't go into any detail on these particular blessings, but it's not controversial to suggest they are completely contrary to the beliefs of Jewish (or any other) society at the time. Since this is the very first teaching we hear from Jesus after the calling of the first disciples, it stands as a sort of manifesto or declaration of purpose for them. Jesus calls them to radically different standards.
We aren't left hanging—Jesus sets out in the rest of the sermon to tell us what our standards as his followers are:
- Exceed the righteousness of the scribes and Pharisees.
- Consider anger to be equivalent with murder.
- Consider lust to be equivalent with adultery.
- Do not divorce.
- Do not swear oaths.
- Do not resist the one who is evil.
- Love your enemies.
- Etc.
These standards seem to be hyperbole: nobody can live up to them. By these standards, I've "murdered" my brother and father within the last week or so. Aspiring to these standards would set the disciples apart from the world because not even the holiest men (the scribes and Pharisees) attempted to attain this level of righteousness.
Finally we can parse the sentence in question:
In the same way, let your light shine before others, so that they may see your good works and give glory to your Father who is in heaven.—Matthew 5:16 (ESV)
I've highlighted the logical connector "so that", which provides a reason or justification for the antecedent clause. The goal is to have other people give glory to God in response to seeing the disciples' good works and the way they will see them is if the disciples "let [their] light shine". This can mean either:
- Good works are advertised or promoted somehow.
- The good works themselves shine into the world.
Given the context of the passage, the second option is clearly correct. In fact Jesus rejects the first option later in the sermon.
There is no textual justification for saying that "light" is talents or spiritual gifts, but there might be some justification for it being God's goodness manifested in Jesus' followers. In the first chapter of Matthew, an angel told Joseph the purpose that his son was meant to fulfill:
"She will bear a son, and you shall call his name Jesus, for he will save his people from their sins." All this took place to fulfill what the Lord had spoken by the prophet:
“Behold, the virgin shall conceive and bear a son,
and they shall call his name Immanuel”
(which means, God with us).—Matthew 1:21-23 (ESV)
So the picture is of God breaking into the world with Jesus who commands his followers to stand out in the world with radically different standards of goodness. Jesus himself "will save his people from their sins." At the time of this sermon, the disciples didn't yet know how it would be accomplished, but after the crucifixion and gift of the Holy Spirit, the church did stand out against the background of the culture with radically good deeds.
Summary
"Light" in this context is radically good deeds that proclaim the difference between Jesus and the world, and which bring glory to God.