snailplane's link says, it comes from "skin meat bones marrow" attributed to the Bodhidharma of Chinese Zen Buddhism. Bones and marrow came to take on the meaning of essential, skin and meat became synonymous with superficial. From there, was also used as a word for criticizing faults/defects (which stems from not recognizing the true nature of sth.), which seems to be its primary current usage, e.g. the JDIC dictionary entry for the derived []{} says:
>
> to speak cynically or with sarcasm
Although is sometimes best translated to irony, as in the fixed expression , e.g.
>
> I quit my part-time job, but ironically was busy with other work all year.
I think works best for cynicism/sarcasm or dark/pessimistic irony, rather than the lighthearted variety of irony.