In broadest terms, literature falls into two categories: comedy or tragedy. Comedy has a happy ending, whereas tragedy has a sad ending, usually through the deaths of one or more main characters.
Therefore, the first comic element in The Tempest is its happy ending. Not only doesn't anyone die, Prospero, influenced by the sprite Ariel, decides to behave mercifully and forgive those who wronged him, even if they don't deserve it.
In between the beginning and the end, however, are a number of comic scenes. Shakespeare usually uses lower class characters to provide comic relief, and he is true to form in this play. One example of a comic element is in act 2, scene 2, when Stephano and Trinculo first meet Caliban. Stephano and Trinculo, a butler and a jester, don't know what to make of Caliban, and after Stephano gives Caliban alcohol, Caliban comically wants to worship this foolish and venal servant as a God.