You adulterous people, don't you know that friendship with the world is hatred toward God? Anyone who chooses to be a friend of the world becomes an enemy of God.James always uses clear, distinct speech.
The adultery theme is used throughout the Old Testament, when referring to the wandering nation of Israel. The reason for this is that the relationship between God and His people is pictured in the marriage relationship. Just as a wife is unfaithful to her husband, so God's people are many times unfaithful to God, therefore the adultery is committed.
James calls us adulterous when we are friends with the world. This word for friend comes from the greek word for "brotherly love". There is a companionship there, a closeness. Notice that James lays it out clearly: friendship with the world will make you God's enemy. There are only two choices: friend of God or friend of the world. And like James says, it is a choice.