Why does F have a higher ionization energy than O?
At first approximation, we need to consider the orbital we are extracting an electron from. Both oxygen and fluorine (and nitrogen, carbon, boron and neon) have a $\mathrm{2p}$ orbital as their highest occupied, so we expect to ionise from that. If you draw a trend of the ionisation energies, you observe that the energy rises from boron to nitrogen, is lower for oxygen and rises from oxygen to neon. Disregarding the slight decrease at oxygen at first approximation we can say that it becomes increasingly hard to ionise an electron from a $\mathrm{2p}$ orbital with higher element number.

This is because essentially the shape and size of the $\mathrm{2p}$ orbitals are (close enough to, at first approximation) equal. So the wavefunction of the electrons we are removing does not change significantly. However, in their vicinity we have a nucleus which changes charge. For boron, we have an effective nuclear charge of $+1$ or $+3$ (depending on whether you count the $\mathrm{2s}$ electrons as shielding or not). For every step we take and every move we make to the right, the effective nuclear charge ($n(\ce{protons}) - n(\ce{core~electrons})$) will increase by one. We need to counter that nuclear charge to remove an electron which, naturally, because increasingly harder the stronger the charge holding it back.

The slight drop in ionisation energy at oxygen warrants a separate explanation. If you observe closer, you realise that the first three p-electrons (boron to nitrogen) are added as &#x3b1; spins while oxygen is the first element to obtain a &#x3b2; spin electron. A single &#x3b2; electron at first approximation has three degenerate orbitals it can populate. This is an unfavourable situation — compare with the Jahn-Teller effect in coordination chemistry that exists to counteract this situation. Thus, the energy required to remove this seemingly extraneous electron is lower than it would be just looking at effective nuclear charge. On the other hand, three &#x3b1; spins are more stable since the system is no longer degenerate. Thus it is slightly harder to remove an electron from nitrogen than it should be.