For example ,when a person drops a book. When he or she lifts a book, he or she gives potential energy to the book (energy absorbed). However, once the he or she drops the book, the potential energy converts itself to kinetic energy and comes in the form of sound once it hits the ground (energy released).
Electron affinity is defined as the change in energy (in kJ/mol) of a neutral atom (in the gaseous phase) when an electron is added to the atom to form a negative ion. In other words, the neutral atom's likelihood of gaining an electron.
When an electron is generally added to a neutral atom, i.e first electron affinity, energy is released; thus, the first electron affinities are negative. However, when an electron is added to a negative ion, i.e. second electron affinity, more energy is required. Thus, more energy is released to add the electron into an ion because the negative ion has to force the electron to go into its electron orbital; thus, the second electron affinities are positive.
First Electron Affinity (negative energy because energy released):
$\ce{X(g) + e- -> X- (g)}$
Second Electron Affinity (positive energy because energy needed is more than gained):
$\ce{X- (g) + e- -> X^2- (g)}$
This is because you are practically trying to forcefully add an electron to it.
Coming to your question: Remember that greater the distance, the less of an attraction; thus, less energy is released when an electron is added to the outside orbital. In addition, the more valence electrons an element has, the more likely it is to gain electrons to form a stable octet. The less valence electrons an atom has, the least likely it will gain electrons.
One might think that since the number of valence electrons increase going down the group, the element should be more stable and have higher electron affinity. One fails to account for the shielding affect. As one goes down the period, the shielding effect increases, thus repulsion occurs between the electrons. This is why the attraction between the electron and the nucleus decreases as one goes down the group in the periodic table.
As you go down the group, first electron affinities become less (in the sense that less energy is evolved when the negative ions are formed). Fluorine breaks that pattern, and will have to be accounted for separately.)
The electron affinity is a measure of the attraction between the incoming electron and the nucleus — the stronger the attraction, the more energy is released. The factors which affect this attraction are exactly the same as those relating to ionization energies — nuclear charge, distance and screening.
The increased nuclear charge as you go down the group is offset by extra screening electrons. Each outer electron in effect feels a pull of 7+ from the center of the atom, irrespective of which element you are talking about.
So,
as atomic radius increases, the nuclear attraction on outtermost electron decreases — this leads to decrease in IE — but the shielding also increases — less energy is released when an electron is added to the outside orbital — decreasing the EA.