Early in 2012, a study was published which demonstrated a correlation between creativity and immorality*.
Far from being offended by this, I thought it was almost a trivial observation: creative people will naturally tend to think of things that others do not, which may be interpreted as immorality in those with a more conformist mindset.
The thing is that art is often a transgressive activity: creative people look for new things to say and new ways to say them, and this thinking of the unthought can lead to thinking the unthinkable. Making art obviously doesn’t lead inevitably to murder and bestiality, but it may lead to questioning social assumptions.
One interesting question I often see on writing forums is some variant on “can I do this?”: can I write a book about vampires when there are already so many? Can I write a story with a puppy turning into a dragon and then destroying all cats?
I usually refrain from answering because it seems to me to be the wrong question. Writing is not about seeking permission. If you are looking for permission to write something, then I would argue that you’re fettering your creativity before you start. Write about whatever you want: vampires, dragons, vampire dragons, vampire dragons in rockets flying to the moon… all of it is fair game.
Where things get tough is whether anyone will want to read what you write – will your book, the umpty-tumpth vampire novel, find an unjaded audience? Will space-faring vampire dragons be perceived as too silly to read? Is what you write going to be interesting to a reader?
This is where the transgression comes in, I think, as well as risk. If you write about something that is unacceptable or uncomfortable to some people, then they decide not only not to read your book but that they should appeal to others to not read your book also. This is where things like library bans for innocuous books like Harry Potter come from: someone gets the idea that any sympathetic portrayal of the supernatural is promoting satanism, and *boom*! the book is banned in schools**. But if you write about things that others are not then you say things that many will want to read.
The alternative, really, is to write the same thing as everyone else, and who really wants to read more of the same thing?
[*] the link rather amusingly suggests there is a link between creativity and immortality, which is almost exactly untrue.
[**] I did look for specific examples of Potter being banned, and this series is apparently now the most banned book in the US the only specific example of a banning which my superficial search found was of a church school in Kent.