had this already several times with no obvious reason:
at one point all applications quit without warning and i get logged out of the finder.
I can login again with no problems, but all unsaved work is gone...
Something about the Window Manager crashing that causes that. That happened to me before, and normally there is something wrong on the system. I'd run a check on permissions, along with a 3rd party app.
I noticed that started happening when I overclocked a 300 MHz G3 to 480 MHz
So it could be an overheated processor/cache running too fast or just bad memory chips.
But I'd try checking/repairing permissions with Disk Utility as Urbansory suggested. If that doesn't help, boot from an OS X install CD and choose "Open Disk Utility" from one of those menus in the installer. From there, you can verify and repair any other problems with the disk.