If three electrons are available to fill three empty 2p atomic orbitals, how will the electrons be distributed in the three orbitals?
The ground state in this case corresponds to one unpaired electron in each of the three orbitals. And, the three electrons will all have parallel spins.
This is one of Hund's Rules for identifying the ground state electron configuration. Specifically, when we have several orbitals with the same energy and total angular momentum, and only enough electrons available to fill part of these orbitals, the electrons will arrange themselves as uniformly as possible among the available orbitals. Thus we get the maximum possible number of electrons remaining unpaired. This arrangement is most strongly stabilized by attraction between the electrons and the nucleus, and least affected by repulsion between electrons in the same region of space.
The rule also specifies that the spins of the unpaired electrons are parallel. This gives a favorable electromagnetic interaction between the unpaired electrons.
For a complete description of Hund's rules see https://en.wikipedia.org/wiki/Hund%27s_rules.