That was my first thought, too. Money in an UGMA or UTMA account belongs to the child, not to the parent; the parent (or other custodian) has control of the account assets, but can use it only for the child’s benefit. If the parent takes money out of the UGMA/UTMA account and deposits it in an ordinary 529 account owned by the parent (even if the child is named as the beneficiary), that could be conversion. Or, in more familiar everyday language, stealing from your child, among other reasons because as the owner of the 529, you can ordinarily change the beneficiary designation anytime you want.
Some state 529 plans will allow the parent to open a 529 with funds from the child’s UGMA or UTMA account and place special restrictions on it, including no change of beneficiary, and control of the 529 account passes to the child at the age of majority (usually 18 or 21, depending on the state) just as if those funds remained in the UGMA or UTMA account. Other state 529 plans don’t ask any questions, leaving it to the parent to do the right thing.
Either way, though, I don’t see how you can generate a tax credit against your own taxes by opening a 529 account with your child’s money. But I’m no tax expert. Talk to your accountant.
I’ve also seen a lot of loose advice out there on the internet saying an advantage of shifting assets from an UGMA or UTMA account to a 529 is that for financial aid purposes, assets in an UGMA or UTMA are considered the child’s, with 20% expected to go toward college expenses annually, while assets in a 529 are considered the parent’s, with only 5.64% expected to go toward college expenses annually. Maybe some people are doing this, and maybe there’s no way for FAFSA or CSS Profile to catch it, but that seems improper to me. Legally, assets in a 529 purchased with UGMA or UTMA funds should belong to the child, not the parent, and should properly be reported as the child’s assets. Unless there’s some special rule I don’t know about.