Jesus is talking here about the role of citizens of the kingdom of God. As citizens of the Kingdom, you are the salt of the earth, the light of the world. In the Beatitudes, Jesus lays down the reward of citizens of the kingdom. In the salt and light metaphor, Jesus speaks of the role of these citizens.
Remember that Jesus is not talking about people outside of the kingdom. Jesus is talking about people who are inside the kingdom. He is addressing those who are already citizens of the kingdom. He is talking to those who are already followers of Christ.
Are you a follower of Christ today? I did not ask if you go to church, or if you pray, or if you believe in God. I asked if you are a follower of Christ today? Many today follow their church, but they do not follow Christ. You become a follower of Christ on the day you accept Him as your Savior. What is your role as a citizen of the kingdom of God? You are the salt of the earth. You are the light of the world. That is your role, your function, your purpose in this world.