If it is a 2007 iMac 20 like mine, the drive could have died.
Mine was booting to the logo, and then shutting off. Nothing else worked, no target mode, though I could boot to DVD.
If it is a version with the WD drive, it is likely about time for it to die.
If that machines drive is corrupted a bit earlier in the boot sequence, it might cause the same issues mentioned.
If it'll bong, the POST is usually fine (power on self test).
---
I was able to boot into single user mode, so I was able to repair the drive by rebuilding the b-tree catalog using a fsck_hfs extension.
This saved the data, or at least got the drive working long enough to run a new Time Machine backup.
---
Before trashing the machine, I'd try to put in a cheap SATA drive, using iFixit for instructions on doing this. A cheap internal drive will be as much as a diagnostic fee out of warranty, likely less.
Of course, the alternative and zero dollar method is to remove the HD or unplug the power cable to the drive, and see if it'll boot to the DVD.