Most operating systems cache write data. That is, they store pending writes to disk in memory and flush it to disk in batches. This improves read performance in certain cases. And, in certain cases, write cache will sometimes remain for long periods of time without being flushed.
The consequence of that is threefold:
- When power is cut during a write cache flush, not all of the data is written. Files will remain incomplete, data will be missing, and filesystem metadata will be corrupt or incomplete. This is why filesystem journaling was introduced. Recovery requires a careful analysis of the hard drive to locate and correct corrupted and missing data. This nearly always results in lost files.
- When power is cut before a cache flush, all of that data is simply lost. Files will not be created, they will remain incomplete, and the filesystem will likely be inconsistent. This results in loss of "unsaved" data.
- If power is lost during any kind of read or write operation on a hard drive, there is a small likelihood that there will be physical damage to the hard drive, which, in certain cases, will result in not only loss of data but unrecoverable damage to the physical drive. Hard drive manufacturers work very hard to make sure that doesn't happen, but the risk is still there.
There are other problems, such as inconsistent hardware state (such as a BIOS flash gone wrong) and thermal shock (such as a hot capacitor suddenly getting very cold) that can result in dead hardware.
So, yeah, unplug it all you want if you don't mind losing data or breaking your computer.