I’d like to add something about making new compound adjectives and nouns, besides the excellent rules above. I am far from an expert on this, but here we go.
I general, you can make your own compound adjectives. However, as a rule of thumb, your should also be able to use the adjective as a predicate adjective, that is, after the verb: an embarrassing-to-be-with girl => this girl is embarrassing to be with. Note that compound adjectives generally don’t require hyphens when used as predicate adjectives. Your example “a cause-to-twitch scene” is odd because “this scene is cause to twitch” is probably not what you meant. To comply with this rule, it should be “a causing-to-twitch scene”.
However, this still sounds a bit odd to me, because “causing” requires an object, that is, something that is caused to twitch, as in “a causing-me-to-twitch scene”. Furthermore, a compound adjective is usually created only when it consists of parts that naturally belong together, something that vaguely resembles a fixed expression.
There is also another type of compound adjective: the one made of an actual sentence, a full expression, or an exclamation. In the example “a yes-we-can attitude”, the sentence “yes we can” is an actual expression that constitutes a full clause or exclamation.
Compound nouns can be written with hyphens, with spaces, or attached, such as bull-dog, hard drive, and pitfall. There is no rule for this: each dictionary makes its choice, you may find the same word written differently in various dictionaries. The reason is that every noun can be used as an adjective to another noun, and every adjective as an adjective, too, of course, so that the unattached form is usually fine. There is never a compelling reason to attach or hyphenate the components of a compound noun such as the three above, except convention. The longer the word has existed as a fixed compound, and the shorter it is, the more chance there is that most dictionaries and writers will write it attached.
The only case in which spaces are not allowed in a compound noun is when its components cannot normally stand apart in a sentence. This applies to, for example, compound nouns made of a sentence, such as in “there are no forget-me-nots to be seen” (the name of a flower), and “please tell what’s-his-name over there to kindly take his shoes off the table”.
When a compound noun is used as a noun adjective, such as in “hard-drive space”, it should be treated as one. That includes hyphens for clarity. Consider the wrong example “hard drive space”. Drive space, is that the space you need to drive by? And how can this type of space be hard?
Note that many, many writers of mediocre talent will sin against these rules and the ones that Milanya gave, perhaps even some good writers, too.
Note also that good writers will be stingy of noun adjectives, as constructions with actual adjectives, prepositions, or full clauses are often both more elegant and easier to read. Compare “a clown face” to “the face of a clown”; “an emission reduction policy” to “a policy to reduce emissions”; and “the ethnicity factor” to “the ethnic factor”. The use of the possessive " 's " is somewhere in between.