Let's tackle these one by one:
It's very important for me/to me to study abroad.
Here both can be used, but they would have slightly different meanings:
- "To me" means that you're the one who cares about it, while "for me" doesn't necessarily mean that it's important to you - it could be that it's important because of somebody else.
To better understand the difference, let's add "My dad thinks":
"My dad thinks it's important for me to study abroad."
...means he thinks it'll be a good thing for me.
"My dad thinks it's important to me to study abroad."
...means he thinks I care about studying abroad.
For me/to me all that matters is how much it will cost.
- First off, I would say the word order here could be improved: I'd recommend going with "All that matters to me/for me is how much it will cost". The order you used puts a stress on the first part: I'd expect to see these sentences in comments such as "I know you care about the time it'll take, but for me/to me all that matters is how much it will cost."
Secondly, technically the same rule as above also applies here: "to me" means directly to you, "for me" might mean that others are the ones who care, though in this case this difference is very small, and somehow the "for me" sounds a tiny bit worse or more awkward. So:
All that matters to me is how much it will cost.
= eg. I don't care about the time it'll take, I just care about the price.
You are the most beautiful girl, at least for me/to me.
- In this case, only "to me" sounds good. Perhaps somewhat because of the distinction noted above - we're talking about the speaker's opinion.
In the second version, let's add on a beginning:
"My mother thinks you are the most beautiful girl for me."
Here - and this is a reach - but it could technically be understood to mean that my mother thinks this girl is the prettiest I can find, though there are prettier ones out there in general
I imagine some might use such a sentence as a concatenation of two ideas: "you are the most beautiful girl" and "you are the girl for me", but technically this would not be correct.
On the other hand, in this sentence:
You are the perfect girlfriend, at least for me/to me.
...the better option would probably be the first one, but again, there would be a slight change in meaning:
"...for me" would mean that I'm acknowledging that while others may also have (near)perfect girlfriends, my specific needs, character, interests, etc. mean that you are the one who is perfect for me. However, note that the girlfriend would prefer to hear this as "You are the perfect girlfriend for me"
"...to me" could be understood to mean something along the lines of, You weren't (or aren't...) the best girlfriend for your other boyfriends, but I think you're perfect. That said, in this case you can't skip the "at least" - it wouldn't sound good without those two words.
To summarize, no wonder you're having problems, because there's a lot of nuances! But I hope this will have helped a bit :)
The very short answer: they do it just the same way that you learned all that difficult grammar in your own mother tongue.
Slightly longer:
How does anyone learn their native language?
Well, according to linguists, they do not.
The process of getting to know how to speak your mother tongue is called acquisition, not learning.
Learning is what other people do when they learn the language as a second (or third, etc) language. They learn the rules, the grammar, and they try to apply them.
Young children subconsciously analyse the words and phrases they hear around them, and they build up a "grammar" in their head, as well as a dictionary, a thesaurus, enormous lists of collocations, etc. They don't actually sit down to study, they just absorb and analyse.
So a native speaker knows that he should say he works instead of he work, and even when he encounters a verb that he has never seen before, he knows the third person singular will get an -s in the simple present.
The amazing thing is that he knows that, even if maybe he does not know anything about grammar. Even if he doesn't know what a "verb" is, what "simple present is", or "third person singular". Even if he has never seen a grammar book, he will be able to correctly say he (new verb)s.
Just look around you at any young kids. You may think that your mother tongue is easy, because even little children speak it very well. But it's not. It's as easy or difficult as English is, and those kids (and you, when you were little) are doing what children everywhere do: they build up an understanding of the grammar of their mother tongue without even realizing it.
Ask a five-year old why he just conjugated that verb correctly, ask him in which grammar book he saw the rules for that, and at best you will get a blank stare.
You had discovered an enormous amount of grammar by the age of three, just like any kid, in any language.
This question reminds me of this old joke:
I am so glad I was not born in China, because I don't speak a word of Chinese!
Best Answer
In this context - the correct sentence is: "It's better to talk in English".
You can talk on English - but that means you are talking about the English language
You can also talk by English - but that would indicate you are talking next to a person called English.
The reason why you can't say "talk by English" to mean talk using English is because English is not a physical tool you use to do the physical action of talking, unlike a pickaxe for mining (mine by pickaxe) or an telephone for talking over long distances (talk by telephone).
However, you can "Communicate by English" - because communication is not a physical action, and English is a tool for Communication.