If you have not already, be sure to try resetting PRAM
and if that does not help, resetting SMU (power management)
When you plug it back into power, if you are using a power strip of some type, try connecting it directly to a wall outlet by itself (at least initially). Start it up with nothing connected, except for the power cord, then (if there is improvement on the display) add only standard USB mouse and keyboard.
There may be a hardware testing tool on Mac OS X instalaltion disc that came with the iMac, but that would not be useful if your display is dead.
If the screen is completely dead (dark), that might be a problem with the LCD or the LCD's backlighting. The logic board may be OK. One thing you can try is starting up normally, then shining a bright light on the display. If the LCD is working, but the backlighting is not working, you may see something being displayed.
You can tell by looking at the capacitors if they are bad. They bludge.
Google: g5 capacitor replacement kit