The electronic structures of substitutional 3d transition metal (TM) impurities in II-VI (ZnO, ZnS) and III-V (GaP) semiconductors have been calculated by the cluster method within the local density functional formalism. The calculated level structures of TM impurity states reveal a quantitative difference between II-VI and III-V semiconductors. The energy shifts of impurity states in varying charged states are larger in ZnO than in GaP, and as a result the valency of charged states tends to change significantly with varying TM impurity species in ZnO, while multivalent charged states easily appear in GaP. This difference is ascribed to the large covalency effect in GaP. The calculated results show that in ZnO, Cu2+, Ni2+ and Co2+ are stable as doubly charged states while Co3+, Fe3+, Mn3+ and Cr3+ are stable as triply charged states. Besides, Cu1+ is also stable. As regards GaP, triply charged states are all stable from Ni3+ to Cr3+, and Ni2+ and Co2+ are also stable. The crystal field splitting of TM impurity states, the so-called 10 Dq, has been also calculated for the above TM impurities, and it has been shown that the covalency plays an important role in determining the value of 10 Dq and also in producing the multivalent charged state. The excitation energies of charge transfer transitions in the case of Cu in ZnO and ZnS calculated by the transition state method, and the values of 10 Dq are in good agreement with the observed ones.