"I was invited" implies a specific event at a specific past time, for example, if I received an invitation in the mail yesterday to Event A.
"I have been invited" might be used if I wanted to say that I have been invited to Event A every year for the past 10 years. The emphasis is less on one specific event at one specific time than the habitual or overall nature of the occurrence. It can also imply not only past but ongoing, if I expected to be invited again this year.
"I had been invited" would be used as a time comparison to another past event, for example, I might say I had accepted an invitation to Event B before I was invited to Event A.