When would the presence of lone pair result in a polar molecule?
A polar molecule must have a finite net dipole moment.


A dipole moment is a result of separation of charges. 

The below explanation requires you to have a basic understanding of dipole moment, vectors and resonating structures. 


Ozone is not polar because of the presence of lone pair on oxygen atoms. In ozone, all the oxygen atoms are not same. Some oxygen atom wants to hold on the electrons more than the others which leads to separation of charges. This separation of charges results in a dipole which makes a molecule polar.





Electronegativity difference in a bond causes one atom to have more affinity for the electrons. This makes that atom attract the pair of electrons more, hence developing a slight negative charge on itself(because of more electron density) and a slight positive charge on the other atom(because of less electron density). This leads to separation of charges and creates a dipole. In the figure, a dipole is shown from carbon atom to chlorine atom. A dipole is represented as a vector with its tail pointing towards the atom having more electron density.





It is not the dipole but the net dipole moment that makes a molecule polar. The net dipole moment is a vector sum of all the dipole vectors. Now, why need vectors for finding the net dipole moment?
Suppose you are being surrounded by a bunch of strong guys who are pulling you through a rope from all sides. They are applying heavy forces to pull you towards them but you won't move because the net force on you is zero. Similarly, in the second figure, the four chlorine atoms are pulling the bond pair of electrons toward itself from 4 different orientations. To account for those different orientations which we know will affect the net pull of electrons by chlorine atoms, we need vectors. 




Consider this case of carbon tetrachloride. The carbon can be thought of being placed at the centre of a regular tetrahedron and the chlorine atoms are placed at the corner of the tetrahedron. All the chlorine atoms are at equal distance from carbon. Even though you might say there is electronegativity difference between carbon and chlorine, the net pull on the electrons of carbon is zero. Hence, the dipole moment is zero despite the electronegativity difference. 


The non-polarity of oxygen atom has got to do nothing with the presence of lone pair on oxygen atom. The oxygen molecule is not completely non-polar. There is instantaneous dipole in oxygen molecule.


No molecule is completely non-polar at every instant of time. H-At is also polar, although its dipole moment is very less. H and At are different atoms. One atom must have a little more affinity toward the electron and hence there will be separation of charges. The electronegavity difference between H and At is very less, therefore the separation of charges is very less which makes its dipole moment near to zero, but still finite.