A unified interpretation of Hund's first and second rules for 2p (C, N, O) and 3p (Si, P, S) atoms is given by Hartree-Fock (HF) and multiconfiguration Hartree-Fock (MCHF) methods. Both methods exactly satisfy the virial theorem, in principle, which enables one to analyze individual components of the total energy E(=T+V(en)+V(ee)), where T, V(en), and V(ee) are the kinetic, the electron-nucleus attraction, and the electron-electron repulsion energies, respectively. The correct interpretation for each of the two rules can only be achieved under the condition of the virial theorem 2T+V=0 by investigating how V(en) and V(ee) interplay to attain the lower total potential energy V(=V(en)+V(ee)). The stabilization of the more stable states for all the 2p and 3p atoms is ascribed to a greater V(en) that is caused by contraction of the valence orbitals accompanied with slight expansion of the core orbitals. The contraction of the valence orbitals for the two rules is a consequence of reducing the Hartree screening of the nucleus at short interelectronic distances. The reduced screening in the first rule is due to a greater amount of Fermi hole contributions in the state with the highest total spin-angular momentum S. The reduced screening in the second rule is due to the fact that two valence electrons are more likely to be on opposite sides of the nucleus in the state with the highest total orbital-angular momentum L. For each of the two rules, the inclusion of correlation does not qualitatively change the HF interpretation, but HF overestimates the energy difference ∣ΔE∣ between two levels being compared. The magnitude of the correlation energy is significantly larger for the lower L states than for the higher L states since two valence electrons in the lower L states are less likely to be on opposite sides of the nucleus. The MCHF evaluation of ∣ΔE∣ is in excellent agreement with experiment. The present HF and MCHF calculations demonstrate the above statements that were originally given by Katriel [Theor. Chem. Acta 23, 309 (1972); 26, 163 (1972)]. We have, for the first time, analyzed the correlation-induced changes in the radial density distribution for the excited LS terms of the 2p and 3p atoms as well as for the ground LS term.