Alan and Maxx are leaving out the most important steps:
1. You cannot eliminate any odor unless you first eliminate the SOURCE of the odor. So first you need to find and fix any oil leaks, replace any permeated hoses
2. BEFORE using ANY degreaser, detergent or other cleaning product, put down bilge pillows or pads to sop up all the oil and/or diesel possible. They don't work once detergent or degreasers are mixed with oil. Replace pads/pillows as necessary...dispose of 'em in approved sites.
3. Scrub the bilges. IMO, a power washer is the best way to clean a bilge, 'cuz it gets into places you can't reach.
4. The most important step: Flush ALL the dirty water out!!! A wet dirty bilge IS a primordial soup of molds, fungi, bacteria, sea water microorganisms and oil that, especially in hot weather, can make a whole boat smell like a swamp or even a sewer! You're not gonna get it clean by just dumping something into it, letting it slosh around a while and then letting the bilge pump dispose of the dirty water...any more than you'd end up with a clean kitchen sink if did nothing more than pour some Dawn into greasy dirty dishwater, swished it around a bit and then just pulled the plug.
5. Use a shop vac, or dinghy bailer, bucket and sponge to mop up the remaining water...then leave hatches open so it can completely dry out for 12-24 hours. Turning fans on if possible helps to accomplish that.
NOW you finally have a clean bilge and are ready to eliminate the residual odor.
There is a product that I tripped over at a boat show in Seattle several years ago and brought samples home to test. It's called PureAyre
http://www.pureayre.com/ and is the ONLY thing I've found that will not only eliminate "organic" (sewage, mold etc) odors, but also diesel, oil and even smoke odors. This stuff WORKS! Put a gallon undiluted in a pump garden spray jug and "hose down" every surface, nook and cranny in your bilges, bait/fish boxes, lockers, and any place else that's smelly (including the inside of your boat shoes!)...even the inside of the fridge...it's approved for use around food. Does a great job on cushions and also on musty foulies and PFDs.
Do NOT rinse!!! Just leave lockers, hatches etc open for 24 hours...put soft goods and anythng else that isn't bolted down out in the sun all day.
Clean your sumps too...and you'll be amazed at how clean and fresh your boat will finally smell! About once a year should be enough to keep it that way.
As for the ozone generators sold for use on boats...a waste of money IMO. Yes, people who've bought them do rave about how well they work. And, yes, the manufacturers do assure you that the ozone concentration is well below that which can present any health hazard. But if that's true, they can't deliver enough ozone to destroy the sources of any odors. If they did deliver enough ozone to destroy the sources of odors, it should only be necessary to run one occasionally. But among all the people you know who've bought ozone generators, have you ever met anyone who has one who's ever been able to turn if off without having odors return? That should be enough to tell you that ozone generators are only very expensive air fresheners, because they don't deliver enough ozone to be anything else. Save your money and get rid of the SOURCES of your odors. Eliminating the source is the only thing that really works.