Are ROM hacks illegal?

They are illegal to redistribute,as they are a "derivative work." They contain coding, and possibly graphics and text from the original game, and are thus as illegal to redistribute as the original ROM.