We study affine cartesian codes, which are a Reed-Muller type of evaluation codes, where polynomials are evaluated at the cartesian product of n subsets of a finite field F_q. These codes appeared recently in a work by H. Lopez, C. Renteria-Marquez and R. Villareal and, in a generalized form, in a work by O. Geil and C. Thomsen. Using methods from Grobner basis theory we determine the second Hamming weight (also called next-to-minimal weight) for particular cases of affine cartesian codes and also some higher Hamming weights of this type of code.