Periodic Property vary in Periodic Table: Electron affinity is a periodic property. As one goes from left to right (i.e., as atomic number increases) in a period the electron affinity increases. The amount of energy released, when one mole of the electron is added to one-mole neutral gaseous atoms of an element to produce one-mole uninegative gaseous ion, is called the electron affinity of that element.
Because when one goes from left to right in a period, the atomic number increases, i.e., the nuclear charge increases. So the nucleus has more and more attraction on the incoming electron. However, this trend is not valid for the last member of the period, i.e., for inert gases. The reason behind is that the incoming electron has to get a position in a new orbit, as there is no vacancy in the valence shell. For this reason, the electron affinity of inert gases is almost zero.
As one goes from top to bottom in the periodic table, the electron affinity of elements decreases gradually. Because with the increase of atomic number in a group the number of electron orbits gradually increase, hence the atomic radius also increases. So the attraction of the nucleus on the coming electron decreases.