I often have friends and congregants who decide to read the Bible from front to back. But getting past the first few chapters is a formidable challenge, because the literature is so very different from what we expect from the Bible. We expect a Law Book or a History Book or objective reporting like a Newspaper. But what we get is something that is neither history nor fiction nor poetry nor prose. It is not until we reach the story of Abram and Sarai in chapter 12 that the story becomes predictably “human”. Until then it is a bit… weird.
If modern readers can get past the conflict between the two Creation narratives in chapters 1-2 (and their conflict with the narrative of evolution), and then make it past the talking snake in chapter 3, the next big shock to the system happens in chapter 6:
 When people began to multiply on the face of the ground, and daughters were born to them,  the sons of God saw that they were fair; and they took wives for themselves of all that they chose.  Then the LORD said, “My spirit shall not abide in mortals forever, for they are flesh; their days shall be one hundred twenty years.”  The Nephilim were on the earth in those days—and also afterward—when the sons of God went in to the daughters of humans, who bore children to them. These were the heroes that were of old, warriors of renown.  The LORD saw that the wickedness of humankind was great in the earth, and that every inclination of the thoughts of their hearts was only evil continually.  And the LORD was sorry that he had made humankind on the earth, and it grieved him to his heart.  So the LORD said, “I will blot out from the earth the human beings I have created—people together with animals and creeping things and birds of the air, for I am sorry that I have made them.”  But Noah found favor in the sight of the LORD.
Wait? Whaaaat? God is sad? So God is going to wipe out EVERYBODY? And whoa. Hold up! Who are these Nephilim anyway?
People always seem to get stuck on the Nephilim. What we have here is a weird detail that scholars have disagreed about for as long as scholars have commented on this text, precisely because there is so little actual evidence to base comment on. We also have an issue here of a minor detail versus the overwhelming message of the rest of the narrative. So, before I go off on this little detail, let's talk about the big picture. Have you ever watched a speech, but completely forgotten what the message of the speech was because you were obsessed about how many times the speaker said "ummm" or some other weird tick? Let's not read the Bible like that. The Nephilim-- whatever they are-- are a random tick in Scripture. The overwhelming message is stated in the next two verses (which re-affirm a theme we see from Genesis chapter 2 until the last chapter of the Bible):
Genesis 6.5–6  The LORD saw that the wickedness of humankind was great in the earth, and that every inclination of the thoughts of their hearts was only evil continually.  And the LORD was sorry that he had made humankind on the earth, and it grieved him to his heart.
One of the over-riding points of the Genesis narrative is that, although humans are made in God's image as God's children with infinite divine potential within ourselves, we KEEP SCREWING IT UP. Over. And over. And over. And over. We keep sinking into addiction and shame and blame and hate and violence. And it breaks God's heart, just like it breaks the heart of any parent who sees their children going down a path that will destroy them. We screwed it up in the Garden (ch. 3). We screwed it up with the first murder (ch 4). We screwed it up when we built civilization (ch 5). And we will keep screwing it up from the Tower of Babel to the lives of Abraham, Isaac, Jacob, and Joseph.
In fact, we screwed up our creative, divine purpose so badly, and grieved God so deeply, that is says here that God “repented”— he was sorry— that God had made humanity. Yet, no matter how self-destructive, addicted, and violent we become, God always seems to make a way to redeem us. God almost never gives up on us. Almost. Only once did God hit the "re-boot" button, and this is the chapter where that happens. God decides “amputate” the gangrenous mass of humanity, so that the healthy remnant can survive. But even at that, Noah comes out visibly crippled and scarred, and the last time we see him he is naked and drunk and cursing (Genesis 9). And so the cycle of sin and violence starts over again, but God promises never to “give up” and wipe out humanity again.
But back to the Flood Narrative in chapter 6. Applying some modern scientific understanding to the text, we might say that God allowed some meteor to hit which creates earthquakes and a tsunami which wipes out Noah's world. Note that this was not the whole planet that was wiped out, but Noah’s culture and land in the Ancient Near East. The Hebrew terms in this narrative don’t need to be interpreted as referring to the entire planet, but can be localized to the land and cultural world of Noah.
The event recorded here is probably a mythicized remembrance of the event that caused the Burckle Crater in the Indian Ocean (ca. 3000 BCE), or the Younger Dryas Event (ca. 12,000 BCE), or something similar. In both of these events massive flooding and geological changes happened, which wiped out Near Eastern civilizations which we have almost no records of (for instance, see Gobekli Tepe). All around the Indian Ocean-- from Africa, to the Sumerian Epic of Gilgamesh, to Plato's story of Atlantis, to Chinese and Indonesian flood myths-- we have stories of massive floods in which only a few members of the human race survive. Most of these stories blame the event on the gods for some petty reason (in Gilgamesh the gods want to kill us because we make too much noise). But in the Biblical account and in Plato's story of Atlantis, God allows the event to happen because of our injustice, hatred, violence, and hubris.
Which brings us to the weird detail: Nephilim. What the hell are the Nephilim? Well, the Hebrew word literally means "The Fallen Ones", from the root word "Nafal" meaning "to fall". Who are these "Fallen Ones"? Here are some options put forward from the mainstream to fringe scholarship:
 In Numbers 13:33 (the only other time the word is used) they are identified as "Giants" and "Heroes of Old". Think of semi-divine beings of great power like Hercules. But this would have been thousands of years after Noah, and it still doesn't answer who they are.
 Some scholars say that the Nephilim are local royalty who abused their "high" position and "fell" into injustice, in particular by raping and using common women however they pleased. This is often connected with being descended from some Biblical “bad guy” such as Cain or Seth. But there are no explicit Biblical connections to be made here.
 Some scholars say these are fallen angels-- demons-- who took bodily form and had sex with women, resulting in supernatural children of great size and power (see #1 above). While I have sympathies with this view, perhaps it is better to think of the Nephilim as “impregnating” ancient humanity with powerful and self-destructive thoughts (i.e. “possessing” them), rather than literally impregnating them. In this view, their “children” were demonically inspired people capable of super-human evil (think: Hitler or Stalin).
 Some fringe theorists claim these are "fallen" aliens who interbred with humans. No credentialed Bible scholar or historian believes this, to my knowledge.
 Other fringe theorists claim these are members of a more advanced version of humanity that developed advanced civilization earlier than other humanoids. They are responsible for the anti-diluvian civilization of Atlantis, and it was the destruction of their culture around 12,000 BCE that spread it-- and their genetics--to humans around the world. This view is not held by many credentialed academics, but fringe theorists such as Graham Hancock.
A final view of the Nephilim may be called “The Mythical View”, and this is what I would generally advocate. But in talking about the Mythical view, I want to make sure to differentiate this story from History without completely de-historicizing it. I don't think Genesis operates as anything near "history" at this point in the text. We only start getting actual historical details-- names of cities that can be dug up, people who can be found-- in Genesis chapter 12. Thus, Genesis 1-11 is rightly called "Myth", not in the sense of "lies", but in the sense of stories which re-mix historic symbols with magical actors to give a moral lesson (think: the myth of the tortoise and the hare).
I think this part of the Genesis narrative is a Myth based on a pre-historic remembrance of the destruction of an advanced civilization, which is mythically remembered under many names by many peoples, notably as ”Atlantis" by Plato. I think this catastrophic flood event was remembered and re-told in such a way as to make a moral point: A civilization built on selfishness, abuse of others, violence, and hubris, will have a great fall. It will be flooded with violence until it is destroyed completely, and even the memory of it is wiped out. And of course this moral point is true-- we are living in it right now-- even if the historic details don't correspond fully to actual history. But there is a nugget of historic remembrance there. And that nugget is that there was an advanced civilization that fell-- Nephilim-- into violence and hubris, and was wiped out by a massively catastrophic geological event.
This moral message is the most important meaning in this text: Don’t become Nephilim. Don’t let pride and selfishness and empire and envy create the kind of society that is destined to fall into a flood of violence and self-destruction. Repent from self-destruction. Instead, embrace God’s self-emptying, self-sacrificial Love, and become part of God’s mission to heal the world.
If you want more reliable information on the Nephilim, I have included web links in the text, as well as part of a mainline Biblical commentary on Genesis 6: The IVP Bible Background Commentary: Old Testament, edited by John H. Walton, Victor H. Matthews, and Mark W. Chavalas.
IVP BIBLE BACKGROUND COMMENTARY ON ON ANCIENT FLOOD MYTHS
The most significant ancient Near Eastern flood accounts are found in the Atrahasis Epic and the Gilgamesh Epic. In these accounts the chief god, Enlil, becomes angry at mankind (the Atrahasis Epic portrays him as disturbed over the “noise” of mankind, see next comment) and, after trying unsuccessfully to remedy the situation by reducing the population through things like drought and disease, persuades the divine assembly to approve a flood for the total elimination of mankind. The god Ea manages to forewarn one loyal worshipper, a king who is instructed to build a boat that will preserve not only him and his family, but representatives skilled in the various arts of civilization.
The other people of the city are told that the gods are angry with the king and he must leave them. The pitch-covered boat has seven stories shaped either as a cube or, more likely, a ziggurat (see comment on 11:4). The storm lasts seven days and nights after which the boat comes to rest on Mt. Nisir. Birds are sent out to determine the time of leaving the ark. Sacrifices are made for which the gods are very thankful since they have been deprived of food (sacrifices) since the flood began.
The Atrahasis Epic is dated to the early second millennium B.C. The Gilgamesh Epic came into its present form during the second half of the second millennium, but used materials that were already in circulation at the end of the third millennium. From the short summary above one can detect a number of similarities as well as a number of differences. There is no reason to doubt that the ancient Near Eastern accounts and Genesis refer to the same flood. This would certainly account for the similarities. The differences exist because each culture is viewing the flood through its own theology and worldview.
IVP BIBLE BACKGROUND COMMENTARY ON GENESIS 6
6:2. The term “sons of God” is used elsewhere in the Old Testament to refer to angels, but the idea of sonship to God is also portrayed corporately for the Israelites and individually for kings. In the ancient Near East kings were commonly understood as having a filial relationship to deity and were often considered to have been engendered by deity.
6:2. The practice of marrying “any of them they chose” has been interpreted by some to be a reference to polygamy. While it is not to be doubted that polygamy was practiced, it is difficult to imagine why that would be worthy of note, since polygamy was an acceptable practice even in Israel in Old Testament times. It is more likely that this is a reference to the “right of the first night,” cited as one of the oppressive practices of kings in the Gilgamesh Epic. The king could exercise his right, as representative of the gods, to spend the wedding night with any woman who was being given in marriage. This presumably was construed as a fertility rite. If this is the practice referred to here, it would offer an explanation of the nature of the offense.
6:4. Nephilim is not an ethnic designation but a description of a particular type of individual. In Numbers 13:33 they are identified, along with the descendants of Anak, as some of the inhabitants of the land of Canaan. The latter are described as giants, but there is no reason to consider the Nephilim to be giants. It is more likely that the term describes heroic warriors, perhaps the ancient equivalent of knights errant.
6:13. Violence as cause of flood. In the Atrahasis Epic’s account of the flood the reason that the gods decide to send the flood is the “noise” of mankind. This is not necessarily different from the biblical reason in that “noise” can be the result of violence. Abel’s blood cries out from the ground (4:10) and the outcry against Sodom and Gomorrah is great (Gen 18:20). The noise could be generated either by the number of petitions being made to the gods to respond to the violence and bloodshed or by the victims who cry out in their distress.