The phrase "sons of God" in Genesis 6:2 has been interpreted to refer either to angels or to human beings. In such places as Job 1:6 and 2:1 it refers to angels, and perhaps also in Psalm 29:1 (where it is translated "mighty ones"). Some interpreters also appeal to Jude 1:6-7 (as well as to Jewish literature) in referring the phrase here to angels.
Others, however, maintain that intermarriage and cohabitation between angels and human beings, though commonly mentioned in ancient mythologies, are surely excluded by the very nature of the created order (Genesis 1; Mark 12:25). Elsewhere, expressions equivalent to "sons of God often refer to human beings, though in contexts quite different from Genesis 6:2 (see Deuteronomy 14:1; 32:5; Psalm 73:15; Isaiah 43:6; Hosea 1:10; 11:1; Luke 3:38; 1 John 3:1-2, 10). "Sons of God" (Genesis 6:2, 4) possible refers to godly men, and "daughters of men" to sinful women (significantly, they are not called "daughters of God"), probably from the wicked line of Cain. If so, the context suggests that Genesis 6:1-2 describe the intermarriage of the Sethites ("sons of God") of Genesis 5 with the Cainites ("daughters of men") of Genesis 4, indicating a breakdown in the separation of the two people groups.
Another plausible suggestion is that the "sons of God" refers to royal figures (kings who were closely associated with gods in the ancient Near East) who proudly perpetuated and aggravated the corrupt lifestyle of Lamech son of Cain (virtually a royal figure) and established for themselves royal harems.
-The NIV Study Bible