Generally, you can expand the phrases "to me" to mean "in my opinion", and "for me" to mean "for my benefit/well-being".
This can be read as "It is important in my opinion" or "In my opinion it is important". If we replace "to" with "for", we get: "It is important for my benefit" or even "It is important for my well-being".
- This sounds stupid to me.
This can be expanded like the first. Here's a context which will illustrate the difference between "to" and "for" here:
Alice: I'm thinking of going on a high-sugar diet.
Bob: That sounds stupid to me.
Here, Bob expresses that in his opinion a high-sugar diet sounds like a stupid idea.
Compare this with:
Alice: I'm thinking of going on a high-sugar diet.
Bob: That sounds stupid for me, since I'm diabetic.
In this case, Bob is expressing that in his case or for his well-being a high-sugar diet would be stupid; it would be unhealthy since he is diabetic.
This can be expanded to read "It will be good for your well-being". But if we replace "for" with "to", we get an idiomatic construction referring to how the subject ("it") will treat the object ("you"), which has nothing to do with anyone's opinion.
- I'll make it comfortable for you.
This parses to something like:
I'll make it [the room] comfortable for you [for your benefit].
But replacing "for" with "to" in this case renders a proposition that is highly suspect. It seems to express that you will make someone regard something as comfortable. Most listeners would probably charitably understand you to mean "for" in this case--but the word choice might identify you as a non-native English speaker.
- I'll make it available to you.
This case is trickier.
If a native English speaker wants to tell someone that she will make a conference room available on a specific date, she would probably employ "to"--but she could, without ambiguity, use "for" as well.
On the other hand, an advertisement for a conference room might say that the room is available for business meetings. But a native English speaker would never say that the room is available to business meetings. This usage is probably customary.
In summary, the general rule-of-thumb is that "to" in these cases is usually used to indicate an opinion, while "for" is usually a statement about benefit or well-being. But there are enough exceptions, idioms, and customs that break this rule that it would behoove you to simply memorize when each is used.