Hyphens are a kind of punctuation mark having several functions with one of them being to hyphenate compound words. There are no certain or consistent rules in the English language about the use of hyphens in compound words giving rise to many doubts about when to hyphenate compound words. One of the ways to ensure the correct usage of hyphens in compound words is to refer to a good dictionary. English is an evolving language and in fact the use of hyphen is gradually becoming obsolete. Words formerly used with a hyphen are now used as one word or two words.
Compound words are made up of two individual words that convey a different meaning when used in combination. Compound words are generally written as two words with a hyphen, but may also appear as two words or as a single word. Hence the confusion arises as when to hyphenate compound words as there are no definite rules for the same. For example: eyewitness, eye-opener, break down, air-condition etc.
Compound nouns are formed by two nouns which may appear as one word, two words or hyphenated. The best way to be sure about which compound nouns take a hyphen is to consult a dictionary. If the compound noun is not listed in the dictionary, it can be written down as two words. For example: set-up, junk-food, keyboard, swimming pool, hen house etc. Compound nouns joined by “in-law” always appear with a hyphen as in mother-in-law, sister-in-law etc. Similarly the word "great" followed by the relation is always hyphenated as in great-grandfather, great-uncle etc.
Compound adjectives consist of two or more adjectives that are used together to describe the noun. The compound adjectives are generally hyphenated in order to clearly convey the meaning of the words used. For example: In the sentence “The tall legged girl won the fashion show” it means that the girl was tall and had legs when in actuality what you meant was the girl who had long legs. The confusion can be avoided by using the hyphen as in “The tall-legged girl won the fashion show”.
Compound verbs are used in combination with a non-adverb and may appear as one word or words with hyphen. Here again it would be best to rely on the dictionary to know when to hyphenate the compound words. If the compound verb is not listed in the dictionary, it is best to hyphenate it. For example: upgrade, down-hill, etc. Compound verbs formed by phrasal verbs are always used as separate words as in the phrases, “put up, bring back, run down etc”.