James 4:4 is one of many verses that, taken in isolation, is extremely difficult to understand. This, my brethren, is why no verse should ever be taken in isolation. When we read a verse, and especially if we're going to go out and quote it, we must be well aware of the nest in which it sits.
The main source of the confusion revolves around the meaning of the word "world". What is the world that God is said to love in John 3:16? It cannot mean the same thing as here in James 4:4, which says friendship with the world is enmity with God. Otherwise, God would be contradictory, or confusing.
Thankfully, James doesn't leave this open to interpretation. Let us read from the beginning of the chapter until verse 10: "From whence come wars and fightings among you? come they not hence, even of your lusts that war in your members? Ye lust, and have not: ye kill, and desire to have, and cannot obtain: ye fight and war, yet ye have not, because ye ask not. Ye ask, and receive not, because ye ask amiss, that ye may consume it upon your lusts. Ye adulterers and adulteresses, know ye not that the friendship of the world is enmity with God? whosoever therefore will be a friend of the world is the enemy of God. Do ye think that the scripture saith in vain, The spirit that dwelleth in us lusteth to envy? But he giveth more grace. Wherefore he saith, God resisteth the proud, but giveth grace unto the humble. Submit yourselves therefore to God. Resist the devil, and he will flee from you. Draw nigh to God, and he will draw nigh to you. Cleanse your hands, ye sinners; and purify your hearts, ye double minded. Be afflicted, and mourn, and weep: let your laughter be turned to mourning, and your joy to heaviness. Humble yourselves in the sight of the Lord, and he shall lift you up."
From this, we see that when James talks about friendship with the world, he is not talking about friendship with the people in it, but rather the lusts it brings. Money, power, food and drink, sex, these sorts of things. Those who love pleasure rather than God are at war with Him, whereas those who submit themselves to Him have the power to overcome such silly things. We don't need to fight and quarrel, seeking to quench the unquenchable hunger. The lusts of the world can never be satisfied. Yet Jesus tells us "Blessed are they which do hunger and thirst after righteousness: for they shall be filled." (Matthew 5:6).
The thing about worldly pleasures is that they end. Their effect wears off, and you have nothing to show for it. In fact, ironically, they destroy more often than not. Relationships are severed, bodies are broken, perhaps even the secular world may descend upon us and destroy us their way. And this is exactly what the devil wants. He loves sowing division and hatred among the people of God. If he sees a loose string, he will pull it. If he sees a crack, he will make it bigger. If all else fails, he'll put a tack on your chair and beg you to sit down. He's pathetic enough to attack the Church every way he can, and we're weak enough to fall for it.
But God isn't. Therefore, our relationship with Him dictates how we relate to the world, and our relationship with the world dictates how we relate to Him. If we love the world, we will chase the world, we will have our fill, and my brethren, we will reap the horrible rewards of what we sow. But if we submit to God, what can Satan do? "Hey Christian, see that nice thing your brother has? You should have that, shouldn't you?" "Hey devil, God gave that thing to my brother, and He gave me what He gives me. Get out of here, you don't belong here." "Hey Christian, isn't that girl pretty? I bet you could have some real fun with her." "Hey devil, shut up, she's precious in the sight of God." "Hey Christian, your brother sinned against you. Are you going to take that?" "Hey devil, God will deal justly between us. Leave my presence, and take your big nose with you." Boom! Unity for us, glory for God, a big red mark for Satan's bum.
Therefore, let us do as James says. Submit to God, resist the devil. Let him have his worldly lusts, and let us hunger and thirst for righteousness. God is more than happy to feed us.
Recommended song: Toby Mac - Hey Devil