R. Abraham Vitirbo raises a variation of this question at the end of the Fifth Essay of Sefer Emunat Chachamim. He mentions that many people are confused because the Mishnah (Avot 2:6) states that Hillel saw a skull floating in the water and said "you were killed because you killed". These people thus wonder why Hevel was killed if he never killed anyone.
R. Abraham first quotes an explanation from the kabbalists, who say that Hevel "cut the shoots" like Ben Zoma (see Chagigah 14b) and he looked and he died.1 R. Abraham then says that the kabbalists might be correct but he knows not of kabbalah, nor did his teachers. Instead he suggests that the Mishnah does not mean that anyone who gets killed must have killed; rather, it just means that anyone who kills will get killed, and it is also possible for other people to coincidentally get killed.
While this approach deals with the fact that Hevel was killed, it doesn't really address whether he did anything wrong to begin with. It's possible that R. Abraham is suggesting that Hevel was indeed killed for no reason, or it could be that he did something else wrong (not killing) and for that he was punished by being killed.
Ralbag in his commentary to Genesis Chapter Four writes that it is possible Hevel glorified himself over Cain for having attained a greater craft:
ואפשר שכבר התפאר בזה הענין הבל ואם לא סופר בתורה
While he doesn't specifically say that Hevel deserved to be killed because of this, perhaps this is "something wrong" that Hevel did.
1. This is not entirely clear because in the actual passage in Chagigah these are three different people — Acher who cut the shoots, Ben Azzai who looked and died, and Ben Zoma who looked and lost his mind:
Our Rabbis taught: Four men entered the ‘Garden’, namely, Ben ‘Azzai and Ben Zoma,
Aher, and R. Akiba. R. Akiba said to them: When ye arrive at the stones of pure marble, say not,
water, water! For it is said: He that speaketh falsehood shall not be established before mine eyes.
Ben ‘Azzai cast a look and died. Of him Scripture says: Precious in the sight of the Lord is the death
of His saints. Ben Zoma looked and became demented. Of him Scripture says: Hast thou found
honey? Eat so much as is sufficient for thee, lest thou be filled therewith, and vomit it. Aher
mutilated the shoots. R. Akiba departed unhurt. (Soncino translation)