According to John 3:16, God “loved the world” enough to give his Son for its salvation. But according to 1 John 2:15, Christians are forbidden to “love the world or anything in the world.” If God loves the world, why can’t we?
In his commentary on 1 John, Colin G. Kruse helps us answer this question by teasing out four different senses of the word world in 1 John:
The word kosmos occurs 23 times in 1 John, and its meaning varies according to context. In one place it means the natural world (3:17), in several places it bears a locative sense—the place into which various ones go or in which they live (4:1, 4, 9, 14, 17; cf. 2 John 7), in other places it denotes ‘worldly’ values or attitudes that are opposed to God (2:15-17 [6x]; 5:4 [2x], 5), and in yet other places it denotes the unbelieving world—people who are opposed to God and believers, and who are under the power of the evil one (3:1, 13; 4:5 [3x]; 5:19).
God loves the world in the first sense; the natural world is his creation. The world in the second sense—as a description of the place to which one goes or in which one lives—is morally neutral. God opposes the world in the third sense; he can hardly be expected to tolerate “values or attitudes that are opposed to [him].” But God loves the world in the fourth sense; he desires to save those who are under the power of the evil one.
First John 2:15 uses the word world in the third sense, and John 3:16 uses it in the fourth sense. There is no contradiction between God loving the world and our not loving the world because the word world means different things in these verses.
With this distinction in mind, let’s read 1 John 2:15-17 in its entirety:
Do not love the world or anything in the world. If anyone loves the world, the love of the Father is not in him. For everything in the world—the cravings of sinful man, the lust of his eyes and the boasting of what he has and does—comes not from the Father but from the world. The world and its desires pass away, but the man who does the will of God lives forever.
We are mistaken if we interpret these verses as a commandment to hate the natural world, which God made, or the world of unbelievers, whom Christ died to save. Rather, they clearly have anti-God values and attitudes in mind: “the cravings of sinful man, the lust of his eyes, and the boasting of what he has and does.” The problem with such values and attitudes is twofold: They do not come from God, and they do not lead to eternal life.
If, then, we love God and love life, we will do well to avoid them.
 Colin G. Kruse, The Letters of John (Grand Rapids, MI: Eerdmans, 2000), 74.