This is actually both a software and an hardware issue.
As previously stated in the other answers, current architectures use a lot of caching mechanisms, in order to speed up processes. On power loss, you loose the content that hasn't been written on the non-volatile memory, even if you thought you had written it into a file. This is a data loss. This may also lead to data corruption, as some filesystems don't write on the disk in the same order as the above programs do, in order to improve I/O rate. I have heard of some people disabling out-of-orders writes in ext4 to make some software file corruption prevention mechanisms still work, while ext4 developers tell that such program should use fsync to ensure the filesystem behavior.
There are also hardware issues. Brutal power down may lead to over-voltage or over-current, mostly due to inductive behavior of some electric components, mostly motors. Nevertheless, well designed hardwares should be able to prevent subsequent damages. It's a bit more expensive, but, if you buy computers with one year warranty (even optional), or, a least, handles customer returns, it is less expensive for the manufacturer to add a flyback diode than to handle customer returns. Therefore, I'm not worried here, except with very cheap power supplies.
It is worth to note that today's reasons to avoid brutal shutdown differ from the one from 30 years ago. 30 years ago, filesystems were very sensible to the power failures, and you were able to corrupt the filesystem itself. Today, you may corrupt files, but not the whole filesystem, in theory. Practically, if you want high-end, state of the art performance, you'll switch to SSD. Solid State Drives use managed flash, usually Multi Level Cells NAND flash (this means double level cells), sometimes Triple Level Cells. With those technologies, on power loss during write, you may corrupt the page being written, but also one or two other pages in the same block. At the filesystem level, a modification of one file may corrupt an other file, or even the filesystem data. Due to wear-leveling, garbage collection, and other correct-and-relocate mechanisms, writes may happen even when the filesystem doesn't require any activity from the SSD (this is called background operation), and corruptions are therefore unpredictable from filesystem point of view. To avoid such corruptions, some SSD manufacturers add capacitors to their SSD to allow to end any ongoing operation on flash when powerloss is detected (this requires roughly 10ms of power supply). SD cards and USB flash drives have the same constraints, but can't have such capacitors.
To put it in a nutshell, a well-designed hardware is generally power-loss proof, but more expensive. Software is most of time power-loss proof, but sometimes assumptions may be broken by the evolution of other software. Any attempt to make cheaper design, or to miniaturize design may reduce the ability to make the design power-loss proof. It is also hard to know if your computer will always resist to brutal power-loss.
2For consumer devices, it's actually the other way around: with MS-DOS you could just pull the plug; when Windows took over you had to learn to shut down properly. – None – 2015-01-19T15:27:26.097
SSDs might be an issue similar to HDDs. They write by erasing data in large blocks and re-writing the new data, so if that operation is not completed for the block there would be data corruption. The O/S may be smart enough to recover from that, but it's not 'nice', and eventually you might have an unrecoverable error. – Spehro Pefhany – 2015-01-19T15:35:30.530
Perhaps also see: Can a power failure or forceful shutdown damage hardware?
– Ƭᴇcʜιᴇ007 – 2015-01-19T18:20:31.3433Let me point out that the potential side effects of "pulling the plug", while technically correct, are typically greatly overblown. I've "brutally" shut down my computer countless times. I've never ever had corrupted files, or hardware problems. Not even once. In over 15 years. – Thomas Bonini – 2015-01-19T20:24:46.513
5@AndreasBonini "I've never ever had corrupted files, or hardware problems." Just to be a pedant, you've never had corrupted files that you've noticed or that had a big impact (e.g., are you sure that no continually written log files or temporary files were corrupted?), or that couldn't be repaired when the system booted against (those "system wasn't properly shut down, checking for errors..." messages) or hardware that completely stopped functioning (e.g., lots of hardware, and especially storage, has built in mechanisms for detecting and working around damaged parts). – Joshua Taylor – 2015-01-19T22:23:52.517
@AndreasBonini It entirely depends how you use your computer. I've had to do data recovery before (last year in fact) to recover the data on my parents' computer as they 'pulled the plug' as they were inpatient and Windows was taking a long time to update. If you do not use your drive for much and it suddenly has an intensive task then you turn the power off, your drive will likely corrupt data. – AStopher – 2015-01-19T22:42:05.227
1Actually, for a modern computer, I'd sum it up like this: assuming you've saved all your files, a power failure is most likely acceptable in most cases, although it may shorten your power supply's life a bit. It's still never a good idea to unplug your computer when it tells you not to. Windows updates, for example, or flashing the BIOS. Interrupting those processes could leave your OS or even your hardware inoperable. That's probably the biggest risk you can take, purposefully interrupting core updates. – phyrfox – 2015-01-20T00:21:26.567
Also note that with today's ACPI shutdown feature, you actually can shut down using the power button. If the OS has support for catching the ACPI signal (like FreeBSD, Windows, Linux,...) this initiates the OS's shutdown sequence.
– Jens – 2015-01-20T08:16:06.637@Pete Becker: Even in the days of MS-DOS, pulling the plug while disks were writing could corrupt files. – jamesdlin – 2015-01-20T10:31:55.070