How can I derive the preferred oxidation states of a transition metal from its electronic configuration?

For example $\ce{Fe}\ (Z=26)$ Short formula: $\mathrm{1s^2\ 2s^2p^6\ 3s^2p^6d^6\ 4s^2}$. If we make the electronic formula we get 4 single electrons ($s=1/2$), which means that the valence in normal state is 4, but in the periodic table it is $2/3/6$. How can I find its valence?

The simple valence bond model works well for nonmetals and the molecules they form. It fails completely and badly when trying to extend it to transition metal compounds. There is no easy way to explain why iron, which has four unpaired electrons in the ground state ($S = 2$) is typically found in the oxidation states $\mathrm{+II}$ and $\mathrm{+III}$ in compounds in aquaeous solution.
This behaviour can only be explained by complex molecular orbital theory. It involves a lot of delicate balances that typically cannot be explained a priori without extensive stability calculations. However, the general gist is that the orbitals are split into different energy levels depending on the compound’s symmetry and the orbitals’ irreducible representation. At first approximation, we can assume a stable configuration if there are no degenerate orbitals that are unevenly populated, but single or multiple unpaired electrons are not a problem. Indeed, iron(III) compounds, that are often very stable, even have a spin of $5/2$ in high-spin state. The secret thereto is even orbital population.