Some analysis on the Lorentzian distance in a spacetime with controlled sectional (or Ricci) curvatures is done. In particular, we focus on the study of the restriction of such distance to a spacelike hypersurface satisfying the Omori-Yau maximum principle. As a consequence, and under appropriate hypotheses on the (sectional or Ricci) curvatures of the ambient spacetime, we obtain sharp estimates for the mean curvature of those hypersurfaces. Moreover, we also give a suficient condition for its hyperbolicity.