Do you have to open a 529 plan for the state that you live in? and if you do, can your child go to college in any state and still use the money saved?
No. But there are some states in which a state income tax deduction is offered only for in-state 529 plans.
Your child can go to any college regardless of 529 state.
More info here:
Pick from the best states with the best plans and go to school anywhere. Only choose your own state if you get a tax credit AND it is in the top two tiers from this guide.
Like any investment, you want the lowest costs possible to make more of your money work for you.