Build a Mass Spectrometer!
Mathematica, 108 bytes

Print@@Join@@({Characters@"CHON",#}ᵀ/.a_/;Last@a&lt;2:&gt;Table@@a)&amp;/@{12011,1008,15999,14007}~FrobeniusSolve~#&amp;


Pure function expecting the input as an integer (1000 times the relative molecular mass); it prints all possible answers to STOUD (and returns an array of Nulls).

The heavy lifting is done by the builtin {12011,1008,15999,14007}~FrobeniusSolve~#, which finds all nonnegative integer combinations of the hardcoded weights that equal the input. {Characters@"CHON",#}ᵀ puts each such combination in a form like {{"C", 0}, {"H", 1}, {"O", 2}, {"N", 3}}. (ᵀ is actually the 3-byte private Mathematica character U+F3C7.)

The transformation rule /.a_/;Last@a&lt;2:&gt;Table@@a changes pairs of the form {x, 0} to {} and pairs of the form {x, 1} to {x} (and spits out errors as it tries to apply to the whole expression as well). Then Print@@Join@@ prints the result in the correct form, avoiding the need to cast the integers as strings and concatenate.