What are we doing when we do art? A simple but true answer, I think, is imitating God. How are we imitating God? We are imitating God as a creator.
We are imitating God’s creativity, but not just his creativity as such. We are imitating a special kind of creativity—a kind that is not just pragmatic, but has a deep aesthetic element to it as well.
Any act of God’s will be an expression of—or at least logically consistent with—his essential nature. God cannot bring about gratuitously immoral or logically impossible states of affairs because God’s nature delimits what is moral and logically possible. Hence, God’s creativity cannot be immoral.
But if what we’re doing when we do art is imitating God’s creativity, then we cannot be doing art when we do things that are immoral. Immoral art is an oxymoron. When one produces something that is immoral, it is not art. An artifact, no doubt. But not art (note: ‘bad’ is ambiguous. There could be a such thing as ‘bad’ art. My claim is only that there is no such thing as immoral art).
How does one know whether an alleged piece of art is immoral or not? It’s really hard to say. And our knowledge of such is fallible. I’m sure there are cases when one (or many) thinks a piece of art is immoral when it is not, and cases when one does not think a piece of ‘art’ is immoral when it is. But I take it that there is a truth of the matter, and this truth, moreover, could very well be context-sensitive.