In electron affinities F<Cl>Br>I>At
Here F<Cl seems puzzling. It is said to be due to the small size of F- making the ion too 'charge-dense' so the electron is less tightly bound. However the increased lattice energies due to the small size of F- more than compensate for its lower electron affinity so fluorides are more exothermic than chlorides.
With groups 13 onwards the relationship is complicated by the fact that the underlying electron shells change in character following the transition elements. Thus B is 1s2 (2s2 2p1) and Al 1s2 2s2 2p6 (3s2 3p1). In both these the valence shell (bracketed) is underlain by a full p subshell. However gallium is 1s2 2s2 2p6 3s2 3p6 3d10 (4s2 4p1) with a full d shell underlying the valence electrons.
As in Ga, in In and Tl the valence shell is also underlain by a more weakly shielding d shell (its electrons spend less time near the nucleus than those of a p shell, so shield its charge less; electrons in the next orbital are therefore more tightly bound). So Ga, In and also Ge, Sn are more electronegative than 'expected' by simply assuming electronegativity and electron affinities fall as one descends a period.
If this is starting to look complicated, there really is no very simple answer; the mathematics needed to fully understand is formidable and well betond my reach!
For example, one of the highest electron affinities is to be found in gold, a metal from which salts of Au- have been made. This is because the outermost orbital, an s orbital, is underlain by weakly-shielding d and f shells, and this electron's mass and hence binding-energy are increased by a relativistic effect. This is because it moves so fast when near the nucleus - and every s electron spends some time near the nucleus, unlike p,d, f etc.