The ground state electronoic configuration of #""_5B# is #1s^2 2s^2 2p_x^1 2p_y^@2p_z^@#.During chemical interaction with #F# atoms one #2s# electron gets promoted to vacant #2p_y# level as shown in the figure below forming 3 unpaired electons in the valence shells and thus it becomes capable of forming 3 covalent bonds using its 3 #sp^2# hybrid orbitals.
As a result the shape of the #BF_3# molecule becomes triangular planer (as only two #p_x and p_y # are involved in hybridisation) where each #/_FBF# is #120^@#. Due to this symmetric structure of #BF_3# the resultant bond moment of any two #B-F# bond just becomes equal but opposite of the bond moment of the third one. This makes the net dipole moment of #BF_3# molecule zero.
Again the ground state electronoic configuration of #""_7N# is #1s^2 2s^2 2p_x^1 2p_y^1 2p_z^1#. Here central N atom uses 3 #sp^3# hybrid orbitals to form 3 #sigma#-bonds with three #F# atoms rendering a pyramidal shape to #NF_3# molecule where lone pair of electrons of #2s# level of N atom occupies the vacant residual 4th #sp^3# hybrid orbital of N-atom as shown in the figure below.
Here the resultant bond moments of 3 #N-F# bonds is somewhat counter balanced by the opposing moment of lone pair on N-atom and thus net dipole moment of the molecule gets diminished.
Thus we observe that #BF_3# has no dipolemoment but #NF_3# has got.