In California, minor children don't ever get to "decide" who they live with and spend time with; that's for the parents to decide, or for the court to decide if the parents can't agree. (That's why, legally, minors are minors, and adults are adults.)
The judge will CONSIDER the wishes of minor children in making a custody decision, IF the minor child is of an "appropriate age and maturity".
There's not a magic age number.
Judges will usually be MORE interested in the REASONS for the preference, than in the preference by itself, and will also be interested in how the rest of the child's judgment and decision-making looks (that's the "maturity" part).
If the rest of a child's judgment looks good and mature, he or she will get more of an ear; if, for lack of a better description, if a child is messing up in the rest of his or her life (poor school performance, law enforcement or discipline problems, etc.) he'll get less of an ear.
I've seen a judge tell a sixteen-year-old: "I understand you want me to change custody; you're a discipline problem, you're messing up in school, and you're in trouble with the law; so your judgment and decision-making, right now, looks lousy. No custody change right now. If you manage to get your act together, and you come back in a year, I'll take another look."
Other things a judge is likely to consider include what arrangements, if any, the moving parent would propose for the other parent to be able to maintain frequent and continuing contact with BOTH parents, and the stability and connections the children have with the community where they've been living.
Judges also are often VERY unhappy with a parent who discusses the custody issues of a case with children who are NOT yet of appropriate age or maturity.
No child ever decides which parent they will live with. Depending upon the circumstances and age of the child a court may entertain comments from the child but it is the court who makes the decision.
Sign up to receive a 3-part series of useful information and advice about child custody law.