There may be a shade of difference between
Have I done something wrong?
Have I done anything wrong?
but that difference is not significant. The word something can indicate a particular thing which may have done wrong, while the word anything is not quite that specific. In other words, anything opens up the possibility that any number of things may have been done wrong.
I can also see a person asking about "something" when he or she has just accomplished a task, and another person indicates displeasure in some way. Then, the question "Have I done something wrong?" would be appropriate.
On the other hand, I can also see a person who has completed an entire task, asking a person for an opinion about how well he or she did. Then, the question "Have I done anything wrong?" might be more appropriate.
That each sentence is a question has no influence on which word to use, something or anything. I'd be interested in knowing why you thought it does.