San: To everyone, polite and respecting the opponent. School, company, community, used everywhere.
Kun: To male who is in a similar age with you, or to male who is younger than you. Used at school, or between friends mainly.
Chan: To very close female friends. Sometimes to male friends as a part of nickname e.g. Daisuke (male) --> Dai-chan. If a male boss calls a lady with chan as in Yuka-chan, it sometimes can be a sexual harrassment because she doen't want to be called in such a way by him. She thinks in her mind, "I'm definitely not your friend!!"
I hope my explanation will help you some :-)