Yes, “to” is correct in that sentence. In that construction, “it” is an expletive standing for the entire clause “that the people around me are happy,” which is the true subject of the sentence: ”“That the people around me are happy is important to me.”
The phrase “to me” simply qualifies “important”: to whom is it important? To you.
The “for” construction is quite different. Using the same example as others above, you would recast the “weight” sentence thus:
For me to lose weight is important.
Here the phrase “for me” goes with “to lose weight”—who is losing the weight—and not with “is important.”
Strictly speaking, the sentence also requires the present subjunctive: “be” rather than “are.”
It is important to me that the people around me be happy.
However and alas, the useful and elegant present subjunctive, though not quite dead in English, is certainly calling for its last rites.