There are three common views on the identity of the 'sons of God' marrying the 'daughters of men' in Genesis 6.1-4:
- Descendants of Seth married descendants of Cain
- Nobles married commoners
- Angels married human women
1. Descendants of Seth married descendants of Cain
This view was popularized by Augustine (City of God, chapter 23), and the argument amounts to the following: the 'sons of God' designates people who are faithful to God (e.g. Romans 8.14), and hence are being contrasted to people not-faithful to God.
The account in Genesis 6.1-4, then, is telling us that there was a mingling of righteous men with unrighteous women, leading directly to the wickedness that prompted God to flood the world. Because Cain's descendants in Genesis 4 are inferred to be more wicked (based on the progression of Genesis 4.8-24), while Seth's descendants are inferred to be more righteous (based almost entirely on Genesis 4.25-26), it is common for adherents of this view to further identify the righteous 'sons of God' with Seth's offspring and the 'daughters of men' with Cain's.
A common criticism of this view is that Genesis 6.1-4 mentions neither Seth nor Cain, so identifying the 'sons of God' and the 'daughters of men' as their descendants, respectively, is accused of presupposing too much about the author's intentions.
2. Nobles married commoners
Another view, originating in 2nd century AD rabbinic thought, is that 'sons of God' designates members of nobility. We know from a variety of texts from the Ancient Near East that rulers were regularly perceived as the 'sons of God'. For biblical examples, see 2 Samuel 7.14 or Psalm 2, where God identifies the king of Israel as his 'son'.
In this case, the 'sons of God' — the rulers of the ancient world — are forcefully taking women from the common folk, which is also attested in ancient Near Eastern culture. The biblical book of Esther depicts such an occasion.
While the 'sons of God' label could indeed refer to nobility, both of views 1 and 2 suffer from the particular designation of the women as being 'daughters of men'. This epithet, which is contrasted to the 'of God', seems completely unnecessary if both the 'sons' and 'daughters' are humans.
3. Angels married human women
The third view is that a group of angels (the 'sons of God') descended upon the earth and married human women (the 'daughters of men'). I would argue this is the most accurate interpretation of the text (see my 'personal thought' below), and it seems to have been the earliest view as evident in both Jewish and Christian texts:
1 Enoch's Book of Watchers (3rd century BC)
And it came to pass when the children of men had multiplied that in those days were born unto them beautiful and comely daughters. And the angels, the children of the heaven, saw and lusted after them, and said to one another: 'Come, let us choose us wives from among the children of men and beget us children.' ... And they were in all two hundred; who descended in the days of Jared on the summit of Mount Hermon. (R.H. Charles translation)
Jubilees 4.15-5.7 (2nd century BC)
in [Jared's] days the angels of the Lord descended on the earth, those who are named the Watchers, that they should instruct the children of men ... And it came to pass when the children of men began to multiply on the face of the earth and daughters were born unto them, that the angels of God saw them on a certain year of this jubilee, that they were beautiful to look upon; and they took themselves wives of all whom they chose, and they bare unto them sons and they were giants. (R.H. Charles translation)
LXX Genesis 6.2-5 (2nd-1st century BC)
Some copies of the Septuagint chose to translate the Hebrew 'sons of God' into the Greek 'angels of God'.
Philo, On the Giants (1st century AD)
"And when the angels of God saw the daughters of men that they were beautiful, they took unto themselves wives of all of them whom they Chose." Those beings, whom other philosophers call demons, Moses usually calls angels; and they are souls hovering in the air.
Josephus, Jewish Antiquities 1.3.1 (1st century AD)
For many angels of God accompanied with women, and begat sons that proved unjust, and despisers of all that was good, on account of the confidence they had in their own strength; for the tradition is, that these men did what resembled the acts of those whom the Grecians call giants. (William Whiston translation)
Jude 6-7 (1st century AD)
And the angels who did not stay within their own position of authority, but left their proper dwelling, he has kept in eternal chains under gloomy darkness until the judgment of the great day: just as Sodom and Gomorrah and the surrounding cities, which likewise indulged in sexual immorality and pursued unnatural desire, serve as an example by undergoing a punishment of eternal fire. (ESV translation)
The epistle of Jude draws extensively upon 1 Enoch; with that textual transmission in mind, it is clear Jude is referring to the episode in Genesis 6.1-4. Jude 6-7 is further repeated in 2 Peter 2.4.
By the second century AD, the Jewish authorities were moving away from the 'angels' interpretation because of the growing view that angels could not, by nature, defy God's will. See, for example, Justin Martyr's Dialogue With Trypho, chapter 79. In this text, Justin (allegedly) debated a Jewish man named Trypho, who said:
The utterances of God are holy, but your expositions are mere contrivances, as is plain from what has been explained by you; nay, even blasphemies, for you assert that angels sinned and revolted from God. (Philip Schaff translation)
Meanwhile, Christian authorities favored it until about the fourth or fifth century, with Augustine being the main contributor to a shift in popular opinion.
As an aside, my personal thought is that Genesis 6.1-4 was written as an etiology for the tribes of 'giants' found in the narrative between the exodus and the rise of David: the Rephaim, the Emim, and the Anakim, all groups remembered for their extreme size (e.g. Numbers 13.33; Deuteronomy 1.28; 2.10,21; 9.2).
The last group, the offspring of Anak, are explicitly said to come from the nephilim (Numbers 13.33). A few 'giants' in particular survived in Israel's social memory: Og of Bashan (Deuteronomy 3.11), Goliath of Gath (1 Samuel 17.4), and a group of six Philistines from Gath (2 Samuel 21.18-22).
By the exilic period, memory of 'giants' who fought against Israel's ancestors was retained in the social consciousness. With this, as the scribes were compiling the larger narrative of Genesis—2 Kings, they wrote a story explaining the immense size and violence of those ancient enemies: Og, Goliath, et al, were offspring of the Rephaim, the Emim, and the Anakim, who were all descendants of the nephilim, the 'mighty men of ancient times, men of fame', who owed their great stature to angelic fathers.