Weyl's criterion for equidistribution