It can be rather difficult to choose the right preposition when it comes to "for me" and "to me". The difference can be so slight that either one can be used without causing misunderstanding at times while only one is possible in other cases.
When we are (i) describing something that mainly reflects our personal opinion, wants or needs (ii) choosing something to be given to us from a selection (iii) requesting for a favour from somone else, we use "for me".
Examples: (i) Gratification is very important FOR ME. (personal wants) / (ii) A seafood platter for this lady, and a clam chowder FOR ME. / (iii) Please send this letter personally FOR ME. (requesting a favour)
We use "to me" more commonly when we (iv) are making a claim or something we think is the truth (v) want something to be brought towards us
Examples: Freedom of speech is really important TO ME. (making a claim) / Bring the file TO ME. (direction towards me)
As you are making a claim about how important family is to you, the more suitable preposition to express this meaning is "to". Answer to your question: Family is important TO ME.
On a separate note, if someone were to interview you and your friends with a question: "What is really important to you?", your can also say: "For me, family is important." because your friends may have different opinions, and you are expressing your personal opinion rather than stating a more absolute claim.
So, the choice of preposition really depends on what you want to express as well as the situation.
I hope this helps.