What did Jesus mean when he said this? The immediate context, was that he was talking about false prophets, and the larger context was the sermon on the mount. The sermon on the mount is Jesus talking about how his disciple lives. It is all about ethics. Christian ethics are summed up in loving God with everything within you and loving your neighbor as your self.
False prophets are, in a word, unethical. How do you identify one? By their bad fruit. That bad fruit is what they do or don't do. The hallmark or the unethical person or the false prophet is that they say one thing and do another. What they do is what we see and tells us what they are. They can talk all day and charm us, but what they do is their fruit. False prophets are also pretentious. They are frauds and posers.
But, when Jesus talks about cutting down the tree,
“It is not merely the wicked, the bearer of poison berries, that will be cut down; but the neutral, the man who bears no fruit of positive virtue must also be cast into the fire.” (Spurgeon)So, failing to do the right thing, is sin. Not producing fruit means a useless tree that gets destroyed. God does not seem to care that you know stuff, that you think stuff, even that you dream stuff. It is what you do that counts. And not doing anything counts against you.
"Interestingly, Jesus does not speak of what the tree does, but of what it does not do: in the last resort it is not the tree that actively bears bad fruit that is condemned, but one that fails to produce good fruit" [Morris, 178].
There is faith and there is unbelief. Faith does things, unbelief does sinful things or does nothing. There is no such thing as do-nothing faith. That is a harsh reality. You don't usually get paid for doing nothing and faith without works is dead.
You might be thinking, "but what about my deep roots or strong branches?" The truth is that it's the fruit that counts. Jesus said that. Fruit comes from roots. What's the fruit or where's the fruit?
Thinking good thoughts is good. Being prayerful is good. Listening is good. Imagining is also good. But what is that all producing? Show me what you've got. Cards on the table. Show and tell time. Let me taste what you've produced. What do you serve to hungry people- metaphorically?
God and people are looking for our fruit. What do you produce? Just as we are evaluated in the marketplace by what we do, we are also evaluated by God for what we do. What you produce is what matters to people and to God. So, what are you producing?
Spurgeon, Exposition of Matthew, Chapter 7
Morris, Matthew, p. 178