- Moodle.org documentation on the chat activity
There is a chat activity within Moodle. It has been improved to the point that it no longer crashes Moodle. However, if you prefer to use Facebook chat or Google Hangouts, you may find that those solutions are more reliable.
What is chat useful for?
In general, chat is more useful for fully-online courses than for face-to-face classes.
Online office hours
A chat room gives you a way to hold online office hours. You can be logged in to the chat room, and students can enter the chat room and ask you questions in real time (or very close to real time—the responsiveness is still limited both by your typing speed and the student's). For an online course, where students cannot realistically come to your physical office, this has its advantages.
Class-wide (or group-wide) synchronous discussion
A chat room also supports a class-wide (or group-wide, within a class) synchronous discussion. This can be useful for some kinds of group work; a chat room will produce quicker results among the group than a forum, and for some kinds of work (for example, brainstorming sessions), the real-time interaction among the participants gives a qualitatively different kind of conversation than what you get with a forum.
In general, though, if you're thinking of using a chat room, you probably want to ask yourself what the chat room will give you that a forum can't. One of the great advantages (from a student's point of view) of online education is its asynchronous nature—without regularly scheduled exercises, a student can make the coursework fit his or her schedule, rather than the other way around. If you're going to give up that advantage by imposing a scheduled exercise, you want to be sure you have a good reason for doing so.