Great question. Clearly, you’re not referring to the literal use of prepositions to describe where an object is related to a box, but rather, you’re asking about the idiomatic usage of prepositions to relate abstract concepts. Here are some examples:
The advantage of knowing English is….
The difficulty (or “problem,” “trouble,” etc) with knowing English is….
The good (or bad) thing (or “part”) about knowing English is….
In these cases, there’s no way to predict whether the correct preposition is “of,” “with,” or “about,” so you just have to memorize it. The way to memorize it is to actually practice using such phrases in sentences, preferably to talk about subjects of interest to you. Reading, and encountering such construction again and again, will also help. This is the same way native speakers learn.
Notice that the choice of preposition depends on the word before it, not the word that follows. This means that when you learn the word “advantage,” you should learn it together with its preposition, and the indefinite article (to remember that it’s countable) “an advantage of.” Let me reiterate — when I say “learn,” I mean you need to practice using it in context.
To answer your question as to just how important it is to get the right preposition in such construction — people will probably understand you even if you get it wrong, but you’ll sound “weird.” This is a typical “give-away” for Europeans (especially Dutch people) who find it realtively easy to learn English, but still have trouble with this idiomatic use of prepositions.
Can you elaborate with an example? Prepositions are used to show the relationship between 2 (or more) different things. (Ex. "The ball is inside the box", where the preposition "inside" is the preposition here describing the relationship between the ball and the box, which in this case is a physical relationship).
In Jean's example [above], you could say 'I gave you the ball' without any preposition, because when an indirect object [you, him, her, them, me, myself, etc] is placed immediately after the verb, the preposition 'to' can be omitted. The word order is important here because, as Jean says 'I gave the ball you' is not correct, although it would probably be understood from the context.
I don't think that any language can be spoken without prepositions. If I did not use "to" no one would know what was being said. For instance if I say "I gave the ball TO you." by saying "I gave the ball you." it does not make sense. I sounds instead that I gave you to the ball.
Without the preposition, we would have no idea where the ball is in relation to the box.