Interesting question. Offhand, it seems to me that this is a rather difficult thing to do. Of course, you can "hammer" the robot with prepared jokes, after all, Siri also sometimes funny answers, but the essence of human humor lies in its individuality, casualness, play on words, etc., so the robot itself is unlikely to start joking better than it could would make a man. On the other hand, it is not very clear why he should do this at all.
This will be possible in the future. The program is capable of solving any problem that I can imagine. The only question is the power of the hardware and the time (and other resources) required to develop the program. I do not see a fundamental obstacle that would prevent the program from making funny jokes. Of course, at the moment technology has not even come close to that level.
The most impressive achievement that I know of is: a computer is able to understand what is shown in the picture and give a text description of the picture (for example, "children playing with the dog on the lawn "). The technology looks very impressive, although it often makes mistakes.
P. S. After getting a few downsides, I came to the conclusion that I should clarify (I took it for granted) that creating a program that can make funny jokes is akin to creating an AI. But I don't see AI as a particular challenge. I believe that in 10-20 years we will see serious progress in this direction. Roughly, I believe that AI will be invented in 2030-2060, and the program will learn to joke funny jokes no later than the end of the 21st century.