Dipole moment of p-dichlorobenzene is zero, but for p-dihydroxybenzene dipole moment is not zero.
Look at the structures of both the compounds:
Here, the p-dichloro benzene has `0` dipole moment because the two electron withdrawing chlorine atoms pull the electron cloud towards each other in same magnitude in opposite direction which cancels the dipole moments of both the direction and net dipole moment becomes zero.
While, in case of p-dihydroxy benzene , the oxygen atom is sp3 hybridized and due to a lone pair , it has a bent shape around oxygen atom so that, the electron pull is same in magnitude but direction is not the same and so the net dipole moment has some specific value.
I hope it is clear now!