Humor is a good place to start when programming chat bot dialogue. The easiest kinds of things your bot can do is one-liners. If your bot is being judged on its humanity, the one-liner may be thought of as a non-sequitur. So there is a real art to balancing jokes with informative answers. Some of the most well developed bots like El Bot, and Eugene Goostman are able to weave jokes into a dialog about their background stories.
As to how to go about learning how to write dialogue for the bot, you’ll have to find a platform that allows you the mechanisms you want to control. AIML has several variations, and has been around the longest, so it has versions that you can just start up and use on the web like Pandorabots.com, or if you want to make your own server and get into some more technical aspects, Program O is good. I have used both for different purposes.
ChatScript is a newer technology and is very versatile at the cost of being in development, so if you enjoy learning new programming techniques, it might be the one for you. The bot is written in C++, but the dialogue is ChatScript. One difference is that AIML script is an XML language, and ChatScript has its own syntax that is more free form.
Some of the older bots do not separate data from processing, they are programmed in Java or Visual Basic, and so on. I would recommend something where you don’t have to recompile every change that you make. Even so, the script you use will need to be reloaded to incorporate your new material.