"Can both fresh water and salt water flow from the same spring? My brothers, can a fig tree bear olives, or a grapevine bear figs? Neither can a salt spring produce fresh water." NIV translation
Now, James uses two examples from the natural world to help us to see what he is saying. First, he uses water and the fact that a single source does not produce two opposite types of water. The second examples are from plants and we see that it does not make sense for a tree/plant to produce any other fruit than the kind that God designed it to produce. Our source of life is Jesus Christ and, in keeping with the nature of that source, we should only have good things coming from us and that includes our words.
"Who is wise and understanding among you? Let him show it by his good life, by deeds done in the humility that comes from wisdom." NIV translation
James talks of wisdom here so we need to understand what wisdom and knowledge are and that there is a difference. Both wisdom and knowledge are from God and therefore nothing can be fully known unless it is in relation to Jesus Christ. Knowledge is an awareness of facts while wisdom is an awareness of how to use the facts for good goals. (That goal is making Jesus Christ known to all people.)
In this verse, James is saying that, the knowledge of Jesus Christ and what He has done for us should be demonstrated in our lives in order to make Christ known to the world. The ability to put that knowledge into action is wisdom.
"But if you harbor bitter envy and selfish ambition in your hearts, do not boast about it or deny the truth." NIV translation
James reminds us here that God knows our hearts and therefore the reasons we do things. If we are doing the good deeds mentioned in verse 13 for the wrong reasons, God knows it and it doesn't do any good for us to deny the truth as we will only be fooling ourselves.
"Such "wisdom" does not come down from heaven but is earthly, unspiritual, of the devil. For where you have envy and selfish ambition, there you find disorder and every evil practice." NIV translation
Any gift from God has the purpose of glorifying Him and building up His followers. If you have "wisdom" and it is being used for any other purpose, it is not a gift from God but is in fact "of the devil". Selfish ambition and envy are not of God and are not to be a part of His children.