"V’Haretz Hayisa Sohu V’Vahu" (Berashis, Perek Alef, Pasuk Bais). The Divrei Yisrael (page 9) brings down the Medrash, which says that this is referring to the actions of Reshaim. "V’Yomer Elokim, Yehi Ohr", (ibid., Perek Gimmel) these are the actions of Tzadikkim. How do we know which actions Hashem prefers, the actions of Tzadikkim or the actions of Reshaim? The Chumash continues, "V’yar Elokim Es Ha’ohr Ki Tov", (ibid. Pasuk Daled) so we can assume that Hashem prefers the actions of Tzadikkim.
However, this Peshat, simplest meaning, of the Medrash seems a little hard to understand. How can we wonder if Hashem prefers the actions of Tzadikkim or Reshaim, the answer seems obvious, of course Hashem prefers that actions of Tzadikkim. So what is the Medrash really asking?
If we look at Rashi on the words "V’Eleh Toldos Noach", (Berashis, Perek Vov, Pasuk Tes), we see that the most important "Toldos", the most important generations of Tzadikkim are their deeds. We can say from this Rashi that actions and generations are interchangeable. In that case we can understand the Medrash to be asking, what is more important to Hashem, the generations of Tzadikkim or the generations of Reshaim. The answer "V’yar Elokim Es Ha’ohr Ki Tov", Hashem finds the "Toldos", the generations of Tzadikkim the most pleasing. And the proof of this is the words of Rashi in Parshas Toldos (Perek Chof Hey, Perek Chof Alef), that Hashem answered Yitzchak’s Tefillah before Rivkah’s because the Tefillos of the son of a Rasha can’t compare to the Tefillos of a son of a Tzaddik.