In Joel 2:17, the Israelites appeal to God's reputation in their request for God to stop the plague of locusts. We see this motif elsewhere in the Bible. Perhaps the most prominent place is Exodus 32:11-12, in which Moses tells God not to destroy the Israelites because of what the nations might think. According to Moses, if God destroys Israel, then the nations will conclude that God was not powerful enough to bring them into the Promised Land. And God wants the nations to believe that he is powerful.
But why does God care so much about what the nations think? The typical C.S. Lewis response is that God magnifies himself before the nations so that they will want to have a relationship with him. That works with some prophets, but not all of them. The prophets with whom it works are Isaiah and Zechariah. Throughout the Book of Isaiah, there is the motif that all of the nations will worship the LORD at Israel's restoration (see Isaiah 2, 19, 66). Zechariah also presents the nations honoring God, some on account of force, and others because they are attracted (Zechariah 8:23; 14).
But Ezekiel and Joel seem to be rather xenophobic, by contrast. Throughout Ezekiel 38-39, for example, God says that the heathen will know that he is the LORD. But God is not magnifying himself to woo them into a relationship with him. Rather, they find out that he is the LORD right before the LORD destroys them. That's the last thought they have. So much for the relationship! And Joel 3:17 prophesies that no strangers will pass through Jerusalem after God's restoration of Israel. That seems to differ from Isaiah's picture of all the nations traveling to Zion to learn God's ways.
As I was thinking about God's concern for his reputation, my mind wandered onto what various Calvinists have said about the glory of God. Calvinists are really big on God's glory. I've often heard them say, "God doesn't act for our sakes, but for his glory." And there are biblical references in which God actually says that, specifically in Ezekiel (36:22, 32). But one question that I've asked myself is this: "If God wants to look good, then why does he do things that do not look good?" Let's take Calvinism, for instance. Calvinism says that God chooses to save only a few people, while he condemns the rest to burn in hell for eternity. As far as Calvinists are concerned, those who are not in the "elect" have no chance of ever being saved. That does not make God look good! It doesn't look all that fair, or loving, for that matter. But, of course, Calvinists will then tell us to just have faith. After all, that's what we're supposed to do with the parts of the Christian religion that don't make sense.
So I'm not entirely sure why God is so concerned about his reputation. Not all of the prophets say that he is seeking a relationship with the nations, plus even Christian movements that emphasize God's glory present him in a seemingly less-than-glorious fashion. And, on some level, they have a point in doing so, since God is not really in the PR business. He's not like Bill Clinton. He doesn't take a poll to see what the nations want a God to be before he decides to act. And, yet, for some reason, he does want to communicate to the nations his power, justice, and solidarity with Israel.