Envy, as Solomon pointed out, sometimes breeds achievement. But at what cost? And are achievements motivated by envy the kinds of achievements that bring lasting happiness? More often, envy simply produces sadness and not satisfaction. Willimon says that, “Envy debilitates its host. Indeed, of all the sins, envy seems to be its own punishment.” Certainly envy is the least pleasurable of all the Seven Deadly Sins.
Robin rightly pointed out, in his comment about pride, that it has less to do with thinking too highly about oneself and more to do with thinking about oneself too much! Indeed, Christians are called to think of others. In a sense, though, envy is the distortion of that aim, for in envy we are so focused on what others have that we neglect to be thankful for what we ourselves have. Even still, it is connected to pride in that we think we deserve what they have (and, perhaps too, that they don't deserve it!).
The Bible commands us not to envy, mostly because God knows how destructive it is. Envy rots the bones. It is the slow and silent killer. Envy led to the first murder. And envy was the emotion that led the Jewish authorities to want Jesus dead. Obviously, then, we need to overcome envy before it gains a foothold in our lives. But how? Stop comparing. Be content. Be zealous for God instead of stuff. All good answers, but easier said than done.
And so, once again, it seems to me that the deadly sin of envy provokes us to be people of prayerful repentance. As we repent, God teaches us to love our neighbors and our enemies so much that the latter becomes the former in our hearts.