Has he destroyed all his pain receptors? It doesn't matter how much pounding he takes from the Bat, he still laughs.
The Joker knows that Batman will not kill him, and that the current court and prison system in Gotham is too corrupt for the Joker to be properly judged and jailed. In The Dark Knight, the Joker expresses this:
You have nothing, nothing to threaten me with. Nothing to do with all your strength.
Batman will never kill the Joker as it goes against what Batman stands for. Both the Joker and Batman know this. The Joker is laughing at Batman's frustration. Even when the Joker is convinced he is actually going to die, he believes he has won by making Batman break his only rule, which is not to kill.
Summary: the Joker is laughing at Batman's frustration, since as long as Gotham remains corrupt and Batman sticks to his morals, the Joker will always win.
This quote from the Joker suggests that his madness is even greater when he is experiencing something unpleasant. Since his madness seems to come from finding jokes in strange places and laughing uncontrollably, he probably starts doing it while unpleasant things happen to him.
Memories can be vile, repulsive little brutes. Like children I suppose. But can we live without them? Memories are what our reason is based upon. If we can’t face them, we deny reason itself! Although, why not? We aren’t contractually tied down to rationality! There is no sanity clause! So when you find yourself locked onto an unpleasant train of thought, heading for the places in your past where the screaming is unbearable, remember there’s always madness. Madness is the emergency exit… you can just step outside, and close the door on all those dreadful things that happened. You can lock them away… forever.”
Batman: The Killing Joke
But then, the Joker also says this about trying to understand him
"The real joke is your stubborn, bone deep conviction that somehow, somewhere, all of this makes sense! That's what cracks me up each time!"
He seems to find special delight in tormenting Batman, who he sees as just as crazy as himself - but on the opposite side of the coin.
“You are truly incorruptable aren’t you. You won’t kill me because of some misplaced sense of self-rightousness. And I won’t kill you because…you’re just too much fun. I get the feeling that you and I are destined to do this forever.”
The Dark Knight
And if there's one thing the Joker seems to believe in, its that anybody is "one bad day" away from insanity. From looking at so many Joker quotes, I believe the joke he is always laughing at is the little piece of insanity he sees in everybody. (His creation of Two-Face in some story-lines also points to this)
Gordon's been driven mad. I've proved my point. I've demonstrated there's no difference between me and everyone else! All it takes is one bad day to reduce the sanest man alive to lunacy. That's how far the world is from where I am. Just one bad day. You had a bad day once, am I right? I know I am. I can tell. You had a bad day and everything changed. Why else would you dress up as a flying rat? You had a bad day, and it drove you as crazy as everybody else... Only you won't admit it! You have to keep pretending that life makes sense, that there's some point to all this struggling! God you make me want to puke. I mean, what is it with you? What made you what you are? Girlfriend killed by the mob, maybe? Brother carved up by some mugger? Something like that, I bet.
I give you: the average man. Physically unremarkable, it instead possesses a deformed set of values. Notice the hideously bloated sense of humanity's importance. Also note the club-footed social conscience and the withered optimism. It's certainly not for the squeamish, is it? Most repulsive of all, are its frail and useless notions of order and sanity. If too much weight is placed upon them... they snap. How does it live, I hear you ask? How does this poor pathetic specimen survive in today's harsh and irrational environment? I'm afraid the sad answer is, "Not very well." Faced with the inescapable fact that human existence is mad, random, and pointless, one in eight of them crack up and go stark slavering buggo! Who can blame them? In a world as psychotic as this... any other response would be crazy!"
Batman: The Killing Joke
It really depends on the temporal line, the Joker version or the character representation, but, mainly, the quickest shortest answer is: because he's crazy.
For example, on the recent Joker movie where he's played by Joaquin Phoenix, the character has a psychiatric condition which makes him laugh uncontrollably when he is under stress. In the Nolan movies, the character seems clearly perturbed, and he has facial scars which resemble a permanent smile, even when he's not laughing, we learn during the movie that his stepfather inflicted those to him asking "Why so serious?" so we can understand that the laughing personality is some psychiatric response to the trauma.
There are many different comic, movie or video game representations of the character where the cause of the continuous laughing has different origins, but more or less always similar, and always related to trauma, accident and psychiatric damage.