Family Law Questions? Ask a Family Lawyer Online.
There is no age at which a child is given absolute authority to choose which parent to live with. The closer the child gets to age 18, the more weight the child's preference is given, with more weight starting around age 14. But it is really just a scale, a 12 year old would have more weight than an 8 year old.
But if both parents agree, then it will happen, barring some major road block (like the child wants to live an parent that is unfit).
Whether something needs to be filed in court depends on what the current custody order looks like. Usually, yes, a modification would need to be filed in court to make the custody change official.