Higgs $\to \mu \tau$ in Abelian and non-Abelian flavor symmetry models