The bonds in each case are polar; however, BeCl₂ is non polar due to its linear structure. The molecule has a net dipole moment of 0.
The O₃ molecule is polar because both ends attract the electrons of the central Oxygen, leaving it with an overall positive charge and the ends with a negative charge.