Preludium
In chemistry we often use some techniques to factorize the (quite complicated) many-particle ground state of atoms and molecules into a series of one-particle states that have to fullfil certain requirements; examples are Hartree-Fock-Theory or Kohn-Sham-Density-Functional-Theory. These one-particle states are what we usually call orbitals or, when you differentiate them according to their spin, spin-orbitals. In the theories that I quoted you then have to solve a series of one-particle Schroedinger-equations which will give you certain discrete energy levels that correspond to bound states of the system. Those energy levels are a fundamental property of the system, i.e. the eigenvalues of its Hamilton operator. You can't have energy levels in between or below. Now, the problem is that the orbitals and their energy levels depend on the number of electrons you have in the system, i.e. considering some species $\ce{A}$ you will find different orbitals at different energies for its anion $\ce{A-}$, neutral species $\ce{A}$ or cation $\ce{A+}$. That is so, because the electrons interact with one another and populating one orbital changes the potential which the other electrons feel.
Main answer
But let's assume for a moment that the orbitals for $\ce{A-}$, $\ce{A}$ and $\ce{A+}$ are the same and only taking into account the electron-electron-repulsion of electrons occupying the same orbital: Starting from $\ce{A+}$ where we have all lower-lying orbitals doubly occupied and one orbital $\psi_n$ with energy $E_n$ singly occupied. Now, if you want add one more electron to this system to get to $\ce{A}$ you have to choose where to put this electron: You can either put it into $\psi_n$ or into some higher-lying orbital, like $\psi_{n+1}$ or $\psi_{n+2}$. If you put it into $\psi_n$, thus pairing the electrons up, you have to pay for that with the electron-electron-repulsion energy between the paired electrons (also known as spin pairing energy) $\Delta E_{\mathrm{pair}}$. So, compaired to $\ce{A+}$ the energy of your new system $\ce{A}_{\text{paired}}$ will be higher by an amount of $E_n + \Delta E_{\mathrm{pair}}$. If you instead put the new electron into $\psi_{n+1}$ you don't have to pair up any electrons, so you don't have to pay $\Delta E_{\mathrm{pair}}$. But the energy $E_{n+1}$ of orbital $\psi_{n+1}$ is higher than $E_n$. So, compaired to $\ce{A+}$ the energy of your new system $\ce{A}_{\text{unpaired}}$ will be higher by an amount of $E_{n+1}$. Now, the question: Which situation is better? For that you have to look at the energy difference between $\ce{A}_{\text{paired}}$ and $\ce{A}_{\text{unpaired}}$. This will be
\begin{equation}
\Delta E = E(\ce{A}_{\text{paired}}) - E(\ce{A}_{\text{unpaired}}) = (E_n - E_{n+1}) + \Delta E_{\mathrm{pair}} \ .
\end{equation}
If $\Delta E$ is negative then $\ce{A}_{\text{paired}}$ is lower in energy and thus energetically favored, i.e. pairing electrons is favored when $|(E_n - E_{n+1})| > \Delta E_{\mathrm{pair}}$. So, coming back to your original question: Typical values of the pairing energy are between 200 and 300 kJ/mol (or 2-3 eV) - for an example have a look here: there you can see that the pairing energy for carbon and nitrogen lies at about $20000 \, \mathrm{cm}^{-1}$ which is ca. 240 kJ/mol. The seperation between energy levels in atoms is usually much greater as can be seen in the table of ionization potentials given here (the differences between the ionization potentials of $\ce{s}$ and $\ce{p}$ valence orbitals are usually greater than 6 eV). Only in molecules and transition-metal complexes with frontier-orbitals that lie close in energy (or are degenerate) you have so called high-spin configurations where it is favorable not to pair up the electrons in a lower-lying orbital but instead to occupy the higher-lying orbital. So in conclusion, it really does "cost" energy to pair up electrons in a single orbital but it usually would cost a lot more energy to force an electron into a higher-lying orbital instead.
Finally, a word of caution: My answer oversimplifies things as I tried to point out in my preludium. There are other effects at work that might have a big influence in some cases.