The lamp of the body is the eye. If therefore your eye is good, your whole body will be full of light. But if your eye is bad, your whole body will be full of darkness. If therefore the light that is in you is darkness, how great is that darkness!
As Jesus continues with his sermon on the mount, we can see how he addresses the issues of his day and brings them all together. Matthew 6 begins by talking about the practices of the hypocrites (Pharisees) in regards to fasting, praying and doing good deeds in public. He notes that they do all these things to be glorified within themselves. They did not do any of these things for God at all.
Immediately following his descriptions of what not to do, he tells us what to do - store up for ourselves treasure in heaven. So how do we know if we are storing up treasure in the right place? Our eyes are the clue! Well, our metaphorical eyes anyway. As Jesus says, the lamp of the body is the eye. In other words, he is building on an ancient concept that the eyes were the "windows of the soul" through which light entered. Jesus is the "light of life" (John 18:12). If a person's spiritual sight is healthy and his affections are directed toward heavenly treasure, his whole being will be filled with light.
On the other side of that - if your eyes are bad, your whole body (your whole being) will be filled with darkness. In other words, if your treasure is not laid up in heaven and you do not have any regard for God or His Son, you have no light within you. The darkness within you would be very great indeed. You may feed the poor and help the homeless. You may be a very compassionate person, but if you purposefully choose to ignore God and banish His existence from your life, you are choosing to walk in darkness all the days of your life. You are choosing to be eternally separated from God, which is very dark indeed.