Genesis 2:5 When no bush of the field was yet in the land and no small plant of the field had yet sprung up—for the Lord God had not caused it to rain on the land, and there was no man to work the ground, 6 and a mist was going up from the land and was watering the whole face of the ground— 7 then the Lord God formed the man of dust from the ground and breathed into his nostrils the breath of life, and the man became a living creature. (All Bible quotation from the ESV, unless otherwise noted. ESV copyright and usage information, see here.)
Genesis 7:4 For in seven days I will send rain on the earth forty days and forty nights, and every living thing that I have made I will blot out from the face of the ground.”
Is, then, Genesis 7:12 the first rainfall in the history of the earth? The passage doesn't say that. However, it may imply that. And, of course, Genesis 2:5 says that it hadn't rained yet, at the time Genesis 2 is describing. But I don't think that the rain that fell in Noah's time was the first rain ever, and, as you'll see if you read on, I'm in good company.
First, a little bit on the words used. The word for rain, in Hebrew, in Genesis 2:5 (see here) is a verb. It is used at least as often when God sends something besides water from the sky, as it is for what we commonly think of as rain. The same word is used in Genesis 7:4. Genesis 7:12 uses a different word, a noun. (See here.)
Now, to public domain commentaries, written by renowned Bible scholars. John Calvin does not consider the question of whether the rain that fell in Genesis 7 was the first rain that ever fell. Neither does John Wesley, not Matthew Henry, nor the commentary of Jamieson, Fausset, and Brown.
Matthew Henry does not consider the question of whether there had been a rainbow before the flood. (Genesis 9) Wesley believes that there had been: "The rainbow, 'tis likely was seen in the clouds before, but was never a seal of the covenant 'till now." The Jamieson, Fausset, and Brown commentary seems to agree with Wesley: "This common and familiar phenomenon being made the pledge of peace, its appearance when showers began to fall would be welcomed with the liveliest feelings of joy." Calvin not only agrees, but ridicules those who have claimed that there were no rainbows before the Flood: "From these words certain eminent theologians have been induced to deny, that there was any rainbow before the deluge: which is frivolous. For the words of Moses do not signify, that a bow was then formed which did not previously exist; but that a mark was engraven upon it, which should give a sign of the divine favor towards men."
Thus, even though these four commentaries are silent on the direct question of whether the rain that came in the time of Noah was the first rain, three of them answer it indirectly -- the rainbow mentioned as the pledge of God's promise not to destroy the earth by a flood was not the first rainbow, in their opinion. And, since a rainbow requires rain, a belief that it had rained before the time of Noah is at least respectable.
See here for a previous post on the title question, dealing with different evidence. See here for consideration of other questions related to the flood.
Thanks for reading!