We give a criterion which allows to prove non-ergodicity for certain infinite periodic billiards and directional flows on Z-periodic translation surfaces. Our criterion applies in particular to a billiard in an infinite band with periodically spaced vertical barriers and to the Ehrenfest wind-tree model, which is a planar billiard with a $Z^2$-periodic array of rectangular obstacles. We prove that, in these two examples, both for a full measure set of parameters of the billiard tables and for tables with rational parameters, for almost every direction the corresponding billiard flow is not ergodic and has uncountably many ergodic components. As another application, we show that for any recurrent Z-cover of a square tiled surface of genus two the directional flow is not ergodic and has no invariant sets of finite measure for a full measure set of directions. In the language of essential values, we prove that the skew-products which arise as Poincare' maps of the above systems are associated to non-regular Z-valued cocycles for interval exchange transformations.