Well I have not personally made a full chat program myself, but I can point out to you the pro's and con's of each method you provided.
With the database, you are going to have the gurantee that your data is written and retrievable even in the case of a web server failure. Basically, if the chat was abrubtly ended, you could go to the database and retrieve the chat data to be re-posted to the user's to continue chatting. However, the downside with using a Database (as is always) is the extra communication and latency of talking with the database. More than likely the db is on another server and that takes a little extra time for the communication. Realistically though for as small as the chat data is, you probably will not even notice any speed or performance issues, but I just point them out to know they are there.
As for variables, you mentioned using 'Application Variables' or 'Session Variables'. Be careful with Application Variables as they are not unique to session and are global across sessions, where as Session Variables are unique to a individual session. Regardless, the plus side of these variable types is that they are held in memory on the ASP.NET server and are really fast. The downside is, they will not persist a session timeout, server restart, app crash, etc. Therfore, if any of the previous events occur, the chat data stored in session would be lost.
A mix might be to persist the session state to SQLServer if needed.
Hope this helps! 