important to — is used when we want to underscore or vent our emotional attachment to something.

My family is the most important thing to me.
This book is important to me because it taught me a lot about life.
A clean house is important to me = I value a clean house.

important for – the meaning of this phrase is more instrumental in nature.
If something is important for us, it means it’s going to progress our cause in some way.

It’s important for me to learn English because I want to get a promotion.
Balanced diet is important for children.
It is important for everyone to know what is happening in Nigeria — this information can help people understand and help other people.