There are three properties to consider when looking at ionisation energy:Atomic chargeAtomic radiusElectron shieldingGoing along a period, the atomic charge increases as there are more protons in the nucleus, the atomic radius decreases and the electron shielding does not change as the electrons being added are going into the same shell. This means the electron you're trying to remove is more strongly attracted to the nucleus because it is closer to a more positively charged centre.However there are exceptions to this rule, Boron's 1st ionisation energy is lower than that of Beryllium and Oxygen's 1st ionisation energy is lower than that of NitrogenBoron's electron configuration is 1s22s22p1. In boron the electron that is removed to find the ionisation energy is the first electron in the 2p sub shell. The 2p sub shell is higher in energy than the 2s sub shell so removing an electron from boron is slightly easier than removing an electron from beryllium. But in carbon, the general effects for a period are stronger than the slight change in energy between 2s and 2p so the general trend is seen again.Oxygen's 1st ionisation energy is lower because of electron pair repulsion. The 2p sub shell holds up to 6 electrons in 3 orbitals. In nitrogen the 2p sub shell has 1 electron in each orbital. In oxygen, the extra electron has to share an orbital. Electrons are negatively charged and repel each other so it is easier to remove the 4th electron in the 2p orbital in oxygen than it is to remove the 3rd electron in the 2p orbital in nitrogen.