Since $Ad_h$ is simultaneously diagonalizable, Let $(e_1,...,e_n)$ be a basis of $g$ where the element of $Ad_h$ are diagonalisable. We have for every $x\in h, [x,e_i]=\alpha_i(x)e_i$, $\alpha_i$ is an element of $h^*$, you deduce that $g$ is the direct sum of $g^{\alpha_i}$ where $g^{\alpha_i}$ is the linear subspace generated by $e_i$.