We have performed first principles total energy calculations to investigate the structural properties of copper iodide (CuI) in its sodium chloride, cesium chloride, zincblende and wurtzite structures. Calculations are done using the density functional theory. We employ the full potential linearized augmented plane wave method as implemented in the wien2k code. The exchange and correlation potential energies are treated in the generalized gradient approximation (GGA), and the local density approximation (LDA). Optical absorption experiments and x-ray diffraction measurements have shown that zincblende is the ground state of CuI. Our calculations find that in the GGA formalism wurtzite and zincblende have similar total energies, while in the LDA formalism the lowest minimum corresponds to zincblende. Results show that the energy difference between the wurtzite and the zincblende structures, as calculated within the GGA formalism is 2 meV, and within the LDA formalism, is 31 meV. These results may suggest a coexistence of both wurtzite and zincblende structures in the ground state of CuI. Structural parameters are correctly reproduced by the GGA calculations. We obtain that under the application of external pressure the atomic configuration may transform into the NaCl structure. At higher pressures it is possible to have a phase transition to the CsCl geometry.