There was no exact "criteria" given to gain these awards. Also just to correct a common misconception, The Iron Cross and Knights Cross are two different awards.
The Iron Cross or Eisernes Kreuz in German, came in two classes, First Class (I) and Second Class (II). To aquire the EK I the soldier had to first have earned the EK II. Both awards (if they were earned) were worn on the tunic (II class in the 2nd buttonhole of the tunic, I class on the left breast pocket).
The Knights Cross (Ritterkreuz) was worn around the neck and was a higher grade award. The actual cross it's self was also larger than I and II class Iron Crosses. On rare occasions these awards could be given simultaneously to the recipient.
All of them are awarded for varying degrees of bravery. The Knights Cross of the Iron Cross was presented and after that a recipient could earn Oaks, Swords and Diamonds (in that order), each which was presented separately and added to the Knights Cross.