Technically, no the Rump Parliament had no legal right to try and execute King Charles. There were no laws in place which dealt with alleged crimes of a king. The Rump Parliament purged the Long Parliament of King Charles and created the High Court of Justice specifically for trying the king.