Two experiments divide students into two groups, the same teacher teaches in both. In one group humor is used to teach the contents of the class, in the other it is not.
The group that learns with humor gets significantly higher grades on the final exam than the group without humor.
Things with humor are more likely to be remembered.
See the full study here :
Avner Ziv (2014). Teaching and Learning with Humor: Experiment and Replication.