Ye are the salt of the earth: but if the salt have lost his savour, wherewith shall it be salted? it is thenceforth good for nothing, but to be cast out, and to be trodden under foot of men.
Note 8 at Mt 5:13: Salt is a preservative and flavoring. Jesus was using salt to illustrate how His disciples are a preserving and purifying influence upon the people of this world. Without the church's influence, this world would be completely useless. The whole tone of this similitude emphasizes our responsibility to others. We must get the salt out of the shaker and into the world.
The "it" referred to in this verse could be interpreted two ways. "It" could be the salt (speaking of the saints of God and their preserving influence) that becomes good for nothing and is cast on the ground and trampled underfoot. This would be similar to Jesus' teaching on the branch that didn't bring forth fruit in Joh 15:6.
"It" could also be referring to the earth that the salt is supposed to be preserving. If we (Christians), as the salt of the earth, don't do our job, then the Lord doesn't have any other method of preserving the earth. It (the earth) will rot as people trample it underfoot without the preserving influence that God's people are intended to give.
This latter interpretation would seem to be more consistent with the context of this verse and stresses the importance of us letting our light shine for Jesus.