In English and other Germanic languages, noun compounds are formed simply by “appending” the nouns in a certain order. For example, phrases like this are very common: 

> 
> electricity price comparison service
> 
> 
> 

In Portuguese, Spanish and probably other Romance languages, this kind of compounding has to be done with the aid of prepositions. The translation of the phrase above to Portuguese is:

> 
> serviço *de* comparação *de* preços *de* eletricidade
> 
> 
> 

What determines how noun compounds are formed in a language? Is there something like a parameter (as in the principles and parameters theory) that explains this?

I'm focusing only on "open" compounds (not idiomatic ones) formed exclusively by nouns. As Molly mentioned, this might be related to the Adj/N word order in the language. This hypothesis is quite reasonable, since in the Germanic languages the head in these compounds comes at the end, whereas in Romance languages, they come at the beginning, matching the Adj/N word order.

But even if this correlation does hold cross-linguistically, how does it relate to the need for prepositions? Maybe prepositions help avoiding ambiguities when the adjectives are postnominal? Could it be related to processing preferences?
['https://linguistics.stackexchange.com/questions/1116', 'https://linguistics.stackexchange.com', 'https://linguistics.stackexchange.com/users/22/']
Compound words are really complex, even if we limit it to noun-noun compounds. 

It looks like you're concerned with "open" compound nouns, not "closed" or hyphenated or [idiomatic](http://www.sciencedirect.com/science/article/pii/0024384168900521) compound nouns [like these](http://www.rickwalton.com/curricul/compound.htm) (what a list! right? corpus alert!). So - 

The syntactic definition of a compound noun is when the rule N -> N N can be recursively applied. Anything with more than two nouns is ambiguous in structure. ((coffee mug) holder) vs. (coffee (mug holder)) or whatever. 

Most languages are more predictable than English when it comes to "headedness" or left/right branching of closed noun compounds; Downing's conclusion to ["On the Creation and Use of English Compound Nouns"](http://www.jstor.org/pss/412913) is basically that the relationship is unpredictable from the semantics of the two words.

My instinct (very scientific!) is that the concatenation vs. use of prepositions for noun-noun compounds is predictable by typology. My guess is that the form of compound nouns is correlated to [the Adj/N word order](http://wals.info/chapter/87) tendency of a language. Of course, this isn't really an answer, but I think the answer you're looking for is too big. It's sort of like asking why a language is SVO or SOV.
Just thinking out aloud, but might it be related to the case systems in Germanic vs. Romance languages?

> 
> electricity price comparison service
> 
> 
> 

...is a shortened form of:

> 
> service for the comparison of prices for electricity
> 
> 
> 

This is the same as your Portuguese translation, where the prepositions act as case licensors. However, in Germanic languages, the case system is/was richer and the prepositions disappear (because they're redundant). In particular, "of" can be seen as a genitive licensor:

> 
> (service for the comparison) of (prices for electricity)
> 
> 
> (prices for electricity)'s (service for the[ir] comparison)
> 
> 
> 

Similarly, "for" is a dative licensor:

> 
> (electricity prices)'s (comparison service)
> 
> 
> 

Dropping the genitive "'s" morpheme doesn't seem like a huge stretch of the imagination and serves brevity:

> 
> electricity price comparison service
> 
> 
>