Word combinations follow a natural progression over time. Whether nouns, verbs, or modifiers, or any mix of these elements, the combination typically goes from two terms (bed bug) to a hyphenated term (bed-bug) to one term (bedbug) as it becomes embedded in our language.
The easiest way to decide if a compound term takes a hyphen is to look it up in the latest edition of a good dictionary. Stick with that dictionary because dictionary spellings vary, and you want to be consistent.
A term that appears in your dictionary as one word (i.e., written solid) or as hyphenated has become a permanent compound. Remember that the dictionary spelling also depends on the property of the term: noun (workout) or verb (work out), adjective (call-in) or verb (call in), etcetera.