The Middle Ages was not particularly known for being a civil and orderly period.
Leopold V had no authority of any kind to arrest Richard I. He did it simply because he wanted to, and could. The illegality of the act is reflected by the fact that it drew official sanction from the Church: Pope Celestine III excommunicated Leopold, and compelled him to prepare for a crusade to seek absolution.
Nonetheless, the secular reaction to what Leopold (and later the Emperor, Henry VI) did was not one of general condemnation. Not even Richard's own government treated it like the crime our modern sensibilities might perceive it to be:
Envy, not abhorrence, was the usual response their deed evoked among laymen . . . The incident was treated by the English government under Hubert Walter, archbishop of Canterbury, as though it were an unfortunate act of God . . . Censure of the king's captors was apparently far from the archbishop's mind.
Dunbabin, Jean. Captivity and Imprisonment in Medieval Europe, 1000-1300. Springer, 2002.
As for Richard's fellow monarchs, far from being offended by the assault upon their rank, they actively rejoiced in celebration. Shortly after his capture, Emperor Henry VI, in a letter to Philip II Augustus the King of France, wrote that:
Because our imperial majesty has no doubt that your royal highness will take pleasure in all of those providences of God which exalt us and our empire, we have thought it proper to inform you of what happened to Richard, king of England, the enemy of our empire and the disturber of your kingdom . . . He is now in our power. We know that this news will bring you great happiness.
Gillingham, John. Richard I. Yale University Press, 2002.
Both men had much to gain from Richard's captivity - Henry sorely needed a cash infusion that a king's ransom could provide, while Philip seized the chance to attack Norman England's continental holdings.
Of course, one factor must have been the fact that Richard had alienated much of his peers. The pivotal one was of course his humiliation of Leopold after the Siege of Acre, but it also went much further:
Richard was a difficult personality and not at all the the fair-minded and gentle knight of legend . . . Subsequently Richard had compromised his reputation to such an extent that he had to leave the Holy Land incognito.
Schutz, Herbert. The Medieval Empire in Central Europe: Dynastic Continuity in the Post-Carolingian Frankish Realm, 900-1300. Cambridge Scholars Publishing, 2010.
Henry VI did actually put Richard on trial over Easter the following year, at Speyer. It was necessarily a show trial, since his intentions were obviously to ransom Richard and bargain for geopolitical gains. In the previous month, Henry had concluded the Treaty of Würzburg with Duke Leopold. By its terms, the duke agreed to deliver the king to the emperor for a share of the ransom money, in a manner perhaps more befitting of mafia bosses.
In any event, Richard delivered an eloquent defense and was promptly acquitted by assembled lords. According to William the Breton, a court poet and diplomat of Philippe Augustus,
When Richard replied, he spoke eloquently and regally, in so lion-hearted a manner, that it was as though he had forgotten where he was and the undignified circumstances in which he had been captured, and imagined himself to be seated on the throne of his ancestors.