First of all we must appreciate the general trend in these ionisation energies. The will always be endothermic (takes in energy) since we must put energy into a system to overcome the strong electrostatic attraction between the positive charge of the nucleus and the negative charge of the electrons. Overall across the period we see an increase in the first ionisation energies because we get an increasing nuclear charge as we move from one element to the next AND a decreasing radius, meanwhile we are not filling any higher energy shells so there is no extra shielding, all contributing to the increase in energy. However as we go from Be to B we see a slight decrease, because in Boron we have to remove a p electron (Boron is 1s^2 2s^2 2p^1) and these p electrons are slightly further away from the nucleus and easier to remove. We also see a decrease in first ionisation energy as we go from nitrogen to oxygen. Oxygen has a 2p^4 electron configuration and this means there must be two electrons paired in one of the p orbitals, and as a result of this there is extra repulsion meaning that less energy is required to remove this electron than for nitrogen which is p^3 in configuration. This explains the trend in the ionisation energies and the anomalies to this trend.