We always say vy to people who are obviously elder than we are.
I agree with Julia, we say vy to people who have same age as we do, and we don't know them.
We say ty to people who are obviously younger than we are , f.e. children (until their adolescence) .
vy is official, ty is for friends.
There are rules to change vy for ty :
if it is a man and a woman, this is the WOMAN who decides, if they can start saying ty to each other. Usually it is the woman, who proposes that, and man should wait this offer. If the man decides to propose that to her anyway, she has the right to refuse (in fact, man can also refuse ).
If these are two women, it is either the elder who proposes to start saying ty. If they have same age, this is the married one who proposes. If they are both married and have same age, it doesn't matter who proposes first -).
If these are two men, this is the elder who proposes to say ty. If they are of the same age, it can be social position which decides (on of the men is a boss of the other , so this is the boss who decides ).