I think laughter considered from an evolutionary standpoint is not a simple behavioral trait, but a variable complex seamlessly stitched together from various phenotypes. One "just-so" story that I like, regards it as originating as a survival-enhancing disabling mechanism. Confronted with a saber-toothed tiger, early hominids could engage in fight or flight and lose either way. A hominid who was momentarily transfixed by fear and emitted strange guttural sounds might've perplexed the tiger enough to stymie its attack. The hominid's escape would've engendered a pleasant feeling of relief, that could be reexperienced and shared with conspecifics around a campfire when the tale of the escape was recounted.
Laughter is a social activity that probably evolved as a social signal to others.
Babies only a couple of days old laugh. What could they be laughing at? Clearly they laugh as a signal to their mothers because it illicit a response from mom to pay attention and give affection to the baby.
We laugh at others as a display of a mild social corrective.
For example, when a man slips on a banana and falls, but is not hurt, we all laugh at his clumsiness. He is embarrassed, and may laugh with us, acknowledging that he made a mistake. His slip was a comedy.
But if that same man slips in a banana and breaks his back ... no one laughs. It is a tragedy. Laughter has no place as it can do no good.
Males laugh at other males when they are acting incompetently. When they cannot do some task.
Females tend to find humor in relationship errors, as when other women do something foolish that causes their relationship to have problems.
The old 1940s comedy act THE THREE STOOGES consisted of three men failing and doing stupid things one after the other. Females tend to find this annoying and not really funny ... while males find this comedy trio very funny.
Female comedians often focus on sexual (relationship) humor that males can find annoying if taken too far.
The sexual differences in comedy is an open field needing more research.
Hello Olivia; Chimpanzees and Bonobos are known to laugh. I have no idea about the context of their laughter...something to look into. Whatever hypothesis is offered for people - adults or babies - it would need to take into consideration the more general case. It's a lovely question. Best regards, Jim Des Lauriers