Ibn Ezra to Genesis (3:6) suggests that Adam had sex with Eve as a result of eating from the Tree of Knowledge. Therefore, sex is euphemistically referred to as knowledge. Additionally, he notes that the sex drive develops as a person becomes aware of good and evil; further reason for the euphemism.
Radak to Genesis (4:1) seems to imply this as well.
In addition to associating sex with the Tree of Knowledge like Ibn Ezra, Rabbenu Bahya to Genesis (4:1) and Tol'dot Yitshak (Genesis 4:1) of R. Yitshak Karo explains it based on the ancient Greek belief (see here) that semen comes from the brain. Accordingly, sex is associated with cognition. This latter explanation is given by R. Avraham Saba in Tsror HaMor to Genesis (Parashat Vayeshev s.v. V'haadam Yada) as well.
Malbim to Genesis (4:25) writes that the term 'knowledge' is generally found in scripture in the context of a couple's first sexual encounter. The connection would therefore be that they gain a new degree of intimacy and knowledge of each other.
HaKtav V'HaKaballah to Genesis (4:1) cites some who explain that the knowledge refers to the man's perceiving the woman which arouses him. He proposes a different explanation; that (if I understand him correctly) it is related to the term יעד, meaning connecting or designating. R. Yehoshua Ibn Shuaib (Drashot R”I ibn Shuaib, p. 48 column 4) similarly explains the expression connotes connection. He quotes this explanation from Ibn Ezra, but I am not aware of anywhere that Ibn Ezra says this. The idea of the expression denoting connection is also stated by Rabbenu Avraham ben Sh'lomo in his commentary to I Samuel (pg. 17), and the Shelah (Pesahim: Perek Torah Ohr: 134).
This is later repeated in Hassidic literature such as Ben Porat Yosef (Parashat MiKets s.v. Ubazeh Yuvan), Noam Elimelekh (Parashat Shelah s.v. yomar), Ohev Yisrael to Shemot (Parashat Parah s.v. V'yikhu Elekha), Siftei Tsaddikim (Ketuvim s.v. Bapassuk ki), and B'Nei Yissakhar (Maamarei Rosh Hodesh Maamar Aleph - Kiddush HaHodesh s.v. heh).
R. DZ Hoffman writes in his commentary to the verse that it means to perceive with the senses (I assume this is the idea quoted above from HaKtav V'HaKabbalah) and is a euphemism for sex. He notes that similar usages are found in Greek and Latin.