We consider Teichmüller geodesics in moduli space of translation surfaces and prove both a Jarnik-type inequality for geodesics bounded in some compact part of moduli space and generalized logarithmic laws for geodesics admitting excursions to infinity at a given prescribed rate. The main issue, for a given translation surface, is studying diophantine approximations in terms of the countable sets of directions of saddle connections or of closed geodesics, filtered according to length. In a more abstract setting, and assuming specific metric properties, we prove a dichotomy for the Hausdorff measure of well approximable directions and an estimate on the dimension of badly approximable directions. Then we prove that on any translation surface the required metric assumptions are satisfied. We derive also some consequences for the billiard flow in a rational polygon.