Simple Green works pretty good on oily residue and general grunge, not so effective on grease. However, it won't discolor paint or eat away at stuff.
As long as you don't spray high pressure water directly into the alternator or distributor, etc, should be OK. Like 8V said, engine compartments are designed to be more or less water proof. Look under the hood after driving through a deluge, everything is dripping with water. However, it isn't a bad idea to unplug the electrical connectors afterwards and dry them with compressed air, then apply a small amount of dielectric grease to the terminals to ward off any corrosion and the resulting high resistance which can cause bad things to happen. Ever see the classic melted terminals at the firewall bulkhead connector? Don't go overboard with the stuff though!