As the name suggests, electron affinity is the ability of an atom to accept an electron. Unlike electronegativity, electron affinity is a quantitative measurement of the energy change that occurs when an electron is added to a neutral gas atom. The more negative the electron affinity value, the higher an atom's affinity for electrons.
Moving from left to right across a period, atoms become smaller as the forces of attraction become stronger. This causes the electron to move closer to the nucleus, thus increasing the electron affinity from left to right across a period.
Therefore, R.H.S of periodic table has a high electron affinity.