Comparing several translations, there is a wide variety on how the verb וְדָבַ֣ק is translated. The NIV uses "is united", ESV "hold fast", NASB "be joined", NRSV "clings", while older translations (KJV, ASV, Douay-Rheims) use "shall cleave". Cleave is an archaic word that is not really used much anymore, but its seems every modern translation uses something different, so let's look at the original Hebrew.
The root of וְדָבַ֣ק is דָּבַק (dabaq). The verb occurs 54 times in the Old Testament. It can have a literal meaning of cling/stick to, for example Job 19:20:
My bones stick (דָּבְקָ֣ה) to my skin and to my flesh, and I have escaped by the skin of my teeth. (ESV)
It can also be used figuratively, as is presumably the case on Genesis 2:24. BDB suggests passages that likely use dabaq is the same sense as our passage:
And his soul was drawn (וַתִּדְבַּ֣ק) to Dinah the daughter of Jacob. He loved the young woman and spoke tenderly to her. (Genesis 34:3, ESV)
from the nations concerning which the LORD had said to the people of Israel, “You shall not enter into marriage with them, neither shall they with you, for surely they will turn away your heart after their gods.” Solomon clung (דָּבַ֥ק) to these in love. (1 Kings 11:2)
For if you turn back and cling (וּדְבַקְתֶּם֙) to the remnant of these nations remaining among you and make marriages with them, so that you associate with them and they with you, (Joshua 23:12)
Then they lifted up their voices and wept again. And Orpah kissed her mother-in-law, but Ruth clung (דָּ֥בְקָה) to her. (Ruth 1:14)
and so on. The common theme here seems to a deep emotional attachment. Two of the passages specifically mention marriage, and the Genesis 34 passage eventually leads to marriage as well.
That said, dabaq can also be used for "overcome" and "keep", but what one does not find in any of the 54 Biblical uses is a sexual connotation.
To back up BDB's classification of Genesis 2:24 as emotional attachment instance, we can see how ancient translators, who were much closer to the original language than we are, took the word. The Septuagint has προσκολληθήσεται, which has a literal sense of "stick to", but when used in regards to human relationships means something like "be faithfully devoted to", especially when used to describe husband-wife relations. (BDAG)
Targums Onkelos and Neofiti have וְיִדבֹק which has more or less the same range of usage as dabaq. Pseudo Johnathan, however, uses מִבַעֲלַה which can mean "be associated with" or "make a partner of".
Finally, the Peshitta has ܘܢܩܼܦ which can mean "adhere to", "join to", or even "be betrothed to".
As such, the ancient translations support understanding וְדָבַ֣ק as joining together in a close relationship. The NET translation notes agree with my analysis, writing:
The perfect with vav (ו) consecutive carries the same habitual or characteristic nuance as the preceding imperfect. The verb is traditionally translated “cleaves [to]”; it has the basic idea of “stick with/to” (e.g., it is used of Ruth resolutely staying with her mother-in-law in Ruth 1:14). In this passage it describes the inseparable relationship between the man and the woman in marriage as God intended it.
(They explicitly connect the passage to marriage, which I have not yet done, but I felt the quote fit best here rather than later.)
Genesis 2:24 states that the man and women shall be/become one flesh (לְבָשָׂ֥ר). The root word בָּשָׂר (basar) is used quite often in the Old Testament (270 times). It is usually translated as flesh, but occasionally body.
The key to understanding the word here is to notice that it is also used in Genesis 2:21 and 2:23:
So the LORD God caused a deep sleep to fall upon the man, and while he slept took one of his ribs and closed up its place with flesh (בָּשָׂ֖ר). And the rib that the LORD God had taken from the man he made into a woman and brought her to the man. Then the man said, “This at last is bone of my bones and flesh (וּבָשָׂ֖ר) of my flesh (מִבְּשָׂרִ֑י); she shall be called Woman, because she was taken out of Man.” (Gen 2:21-23, ESV)
The author of Genesis is making an analogy. The flesh (literally a rib) that was taken from Adam to create Eve is metaphorically "returned" to create a whole. Adam is missing apart of himself. He is literally and metaphorically incomplete without Eve. Likewise, a man is incomplete without a woman. The author is saying that man needs to be united with woman.
עַל־ כֵּן֙ ("therefore")
This connection, while obvious enough from the repeated use of basar, is made explicit in the text. The Hebrew phrase עַל־ כֵּן֙, translated by the KJV as "therefore", draws a connection between what precedes and what follows. The previous verse(s) provide the reason why a man leaves his parents, seeks out a woman, and unites with her to become one flesh. Furthermore, it sets up Genesis 2:24 as a comment on the preceding verse by the narrator; that is, distinguishes it from Adam's speech. (Compare Genesis 10:9; 26:33; 32:32.) As such, the NET translates the phrase "That is why".
Nature of the union
The word "flesh" carries a slight sexual connotation in English. However, there is no evidence that the author was thinking of a sexual union in Genesis 2:24. As already discussed, the verb dabaq does not support a sexual union. The noun basar also does not support a sexual connotation. Of 270 uses in the Old Testament, I believe the word is used in connection with sex in Ezekiel 16:26 ("You also played the whore with the Egyptians, your lustful [literally "of great flesh"] neighbors, multiplying your whoring, to provoke me to anger." (ESV). By far the normal meaning is literal flesh or as a metaphor for the whole body. If either of those meanings makes sense in context (which they do), it would be irresponsible to postulate an obscure metaphor for sex. None of this, of course, means that sexuality is excluded from the union, only that it it is not the defining trait.
What then is the nature of the union? According to most commentators, Genesis 2:24 is setting up the base for marriage. Targum Onkelos agrees. In v23 we find "And Adam said, This now is bone of my bone, and flesh of my flesh: this shall be called Woman, because from her husband (מִבַעֲלַה) this was taken." The word מִבַעֲלַה means "husband" or "master", but not simply "man". It seems the Targum's author clearly has marriage in mind.
This interpretation is also backed by Malachi:
But you say, “Why does he not?” Because the LORD was witness between you and the wife of your youth, to whom you have been faithless, though she is your companion and your wife by covenant. Did he not make them one, with a portion of the Spirit in their union? (Malachi 2:14-15a, ESV)
Here, the author makes a clear allusion to Genesis 2:24 and ties it to the marital union. He continues:
“And what was the one God seeking? Godly offspring. So guard yourselves in your spirit, and let none of you be faithless to the wife of your youth. For the man who does not love his wife but divorces her, says the LORD, the God of Israel, covers his garment with violence, says the LORD of hosts. So guard yourselves in your spirit, and do not be faithless.” (2:15b-16)
Malachi thus argues that because the martial union has created one flesh, to divorce is an act of violence, a ripping apart of flesh so to speak.
Genesis 2:24 is about marriage. The grammar does not support reading the passage as simply a sexual union and the flow of the analogy from Genesis 2:21-2:24 suggests that a man is incomplete without a wife. This is how ancient translators and interpreters saw the passage. The conclusion is also reinforced by Genesis 2:18 which says that God wanted to create a partner for Adam because he was alone. He needed companionship, and to fill this need a being of like substance was created out of his own flesh. Man's need for companionship is not fulfilled via sex, nor does a sexual union make him complete. Only a deep relationship, united in marriage, can do that. The traditional interpretation that the passage is providing the basis for the marital union is correct.
Based on my analysis I endorse the NET translation of 2:24 as a significant improvement over most translations:
That is why a man leaves his father and mother and unites with his wife, and they become a new family.
According to Genesis 2:24, a man and a woman become "one flesh" via the act of marriage. The passage does not explicitly state how marriage is defined, but it is clear that something more than a sexual union is in mind. Instead, the author's intention is to provide a reason why marriage occurs, and his answer is that man is incomplete without woman. Marriage unites husband and wife to form "one flesh", a complete being.