The sermon the mount is the first sermon recorded by Matthew and it begins with the word, "Blessed". It can rightly be translated, "Happy." His ambition in coming is not to make life harder, or less happy, but maximally happy. The irony of this happiness is that it comes in the opposite way that people naturally pursue it. That is evident from the first line, "Blessed are the poor in spirit." Happy are those people who do not make much of themselves or feel they need to stand up for themselves, but who are gentle and humble.
Next he tells them they ARE the salt of the earth and the light of the world. This is not primarily an exhortation to behave a certain way. It is a statement of fact. It is the explanation for God's plan of lighting and preserving the world. And, then that fact must result in lights shining and salt being salty, otherwise God's program for this world is not going to work.