A general rule of thumb may be that a child who is at least 10 years old is considered mature enough to make this decision, but some older children may not be mature enough to clearly express their preferences or make the court see why they would like to live with a parent and not with the other one. It's common for parents to ask at what age their child can decide on custody. In Massachusetts, children can't decide where to live until they're at least 18 years old. However, Massachusetts courts should consider a child's custody preference when the child is mature enough to have a rational opinion.
In Massachusetts, expressing a preference on the part of a child in a custody dispute is treated with caution. The older the child, the greater the weight assigned to the child's expression of preference. While you should follow the terms of your custody order as closely as possible, there are circumstances where a visitation may be impossible. An older teenager may flatly refuse visitation, and there's not much parents can do.
However, parents with younger children will need to play a more active role in ensuring visitation takes place.