This is a good question. Let me make two points.
First, these two works are different genres. Plato's Apology is a philosophical dialogue. Aristophanes's Clouds is a comedy. In light of this, we can say that purpose of each is very is different. The first is a work of serious philosophy. The second is a work of entertainment intended to make people laugh, usually by poking fun at people.
Second, in terms of characterization, Plato paints a picture of Socrates, as a philosopher to the end, that is, a person who truly lives a life of the pursuit of truth. In addition, Plato's view of Socrates is filled with courage, a person who is unafraid of death. In the work, a number of citizens from Athens accuse him of corrupting the youth and not believing in the gods. Of course, Socrates disagrees. In fact, Socrates states that he is doing the city of Athens a great benefit by questioning things. In light of this, Plato portrays Socrates as one who is persecuted unjustly.
Socrates's companions want to break him out of jail, but he would not do so, because as a philosopher he honors the law and is unafraid of death. So, we see a unjust sentence, courageous death, and the fruit of philosophy.
In Aristophanes's Clouds, Socrates is seen as the worst kind of sophist; he is the head of the Thinkery. Aristophanes says that Socrates is the one who can make the weaker argument stronger and the stronger argument weaker. He is not seen as a student of philosophy and truth, but a confused thinker whose feet never touch the ground.