You can't predict every hard-drive failure. But when a drive goes down because certain hardware components are slowly degrading, then S.M.A.R.T. (Self-Monitoring, Analysis, and Reporting Technology) can help warn you of an impending crash, so you have time to run a last-minute backup. Mac OS X already uses S.M.A.R.T. to track the health of drives, but it only runs a check whenever you use Disk Utility to verify a disk. SMARTReporter is a free, open-source tool that checks the S.M.A.R.T. status of drives hourly (by default, or at any interval you set). SMARTReporter can display a menu bar icon to let you know your drive's status (green or red), and it can also show an alert, send you an e-mail, and even execute an application if it detects a problem. SMARTReporter also supports Growl for notifications, as well as the iOS Growl client Prowl so you can get drive-failure notifications on your iPhone.
Because of the limitations of S.M.A.R.T., SMARTReporter won't catch every impending failure (and unfortunately, it is also limited by OS X to checking ATA, SATA, and eSATA drives, not FireWire or SCSI), but this app can provide a very helpful warning for many types of failures.
From Julian Mayer:
SMARTReporter is an application that can warn you of some hard disk drive failures before they actually happen! It does so by periodically polling the S.M.A.R.T. status of your hard disk drive. S.M.A.R.T. (Self-Monitoring Analysis and Reporting Technology) is a technology built into most modern hard disk drives that acts as an "early warning system" for pending hard disk drive problems. SMARTReporter can notify you of impending hard disk drive failures by sending e-mails, displaying a warning dialog or executing an application. The current status of your hard disk drives is always displayed through the customizable menu item. Because SMARTReporter relies on the S.M.A.R.T. implementation of Mac OS X, it only supports ATA, SATA or eSATA hard disk drives, if you want S.M.A.R.T. support for your FireWire hard disk drive, send feedback to Apple. Please note that a S.M.A.R.T. alert doesn't mean that your HDD will completely fail for sure, nor can S.M.A.R.T. catch all possible HDD errors - it's just a very valuable indicator.