Ahh, the sweet tinkling laughter of a child, there's no more beautiful sound in the world (except for when it's the middle of the night and you don't have a child).
Despite the fact that it's something we do every day, scientists aren't entirely sure why humans laugh and there are only a few species on the planet that do it. Despite that fact that many other animals also have complex social structures like our own, they appear to be largely humourless.
It appears to be most similar to the panting sound made by young apes when their parents tickle each other, but seeing as we're equally in the dark as to why they do that, it's not all that helpful.
Also, laughter isn't necessarily anything to do with humour, anyone who has politely sat through their father-in-law's jokes will attest to that. It is reckoned that only around 20% of laughter is in response to an actual funny joke or a stimulus like tickling, the rest is made up of the polite guffaws and awkward giggles that punctuate conversation without anything really being funny.
It is also thought that perhaps laughter is used as a way of controlling the behaviour in our social groups. The difference between "laughing with" and "laughing at" someone could be the key to this.
When you laugh at someone, you are essentially telling them that their behaviour is not acceptable to your group, either pushing them out or forcing them to alter it, whereas "laughing with" is a signal that the behaviour is accepted within the group.
The fact that humour plays a role in sexual selection - that women love a sense of humour - could be the reason for its prevalence in humans as it would be a successful trait passed down through generations.