Could be because of an improper hard drive installation (not wired correctly, screws to tight), failing power supply (not enough power to the hard drive), flaky hard drive adapter (or controller), incorrect hard drive setting in CMOS Setup or simply a dead hard drive.

One of the easiest ways to test it would be to hook up another compatible, known-good hard drive. If it works you know everything but the original hard drive is OK.