Who knows what the first joke was, but I clearly remember my daughter's first joke.
She was in the back seat of the car, in her car seat. She was about 2.
She said loudly, "HEY!"
I said, "What?"
She said, "HEY!", and giggled a little.
I said, "What?", and she giggled some more.
I looked back to see what was going on, and she was pointing to a piece of hay stuck to her shoe.
But since puns require a fairly advanced grasp of language, I doubt the first joke ever was a pun.