Shakespeare uses Malcolm more as a symbol than a fully fleshed-out character
He represents order or the status quo: he is the true heir to Duncan and the rightful king, as appointed by God according to the Divine Right of Kings
This stands in contrast to Macbeth, who represents chaos
Shakespeare uses Malcolm to explore the idea of what makes a good, rightful king:
In contrast to Macbeth, he unites the Scottish thanes to battle against Macbeth
In contrast to Macbeth, he is not presented as a tyrant
In Act IV, Scene III, Malcolm discusses with Macduff what makes a tyrant, and then assures Macduff he is no such thing
With the rightful king (Malcolm) not on the throne, the world is thrown into disorder: the Great Chain of Being has been disrupted
Shakespeare returns Malcolm to the throne in the last scene of the play and, therefore, the order is restored to the kingdom