Abarim Publications' online Biblical Hebrew Dictionary
The masculine noun תאם (to'am) occurs over the whole Semitic spectrum, always meaning twin. It's not clear from which idea this word is formed, but two births for one pregnancy was undoubtedly seen as a blessing. On the other hand: the constellation of Twins was venerated all over the classical world and doesn't seem to be connected to fruitfulness or a two-birds-in-one-stone idea.
In Babylonian astrology the Twins were manifestations of one deity called Nergal (2 Kings 17:30). Nergal wasn't only the chief of the underworld, he also "burned" outdated teachings. In Greek mythology, the Twins, or Dioscuri, were patrons of travelers and particularly sailors (Acts 28:11).
In some stories the Twins were mortal and in some immortal, but one particular strand of mythology depicted one as mortal and the other as immortal. It may be (and now we're guessing) that these Twins reflected confirmation and thus certainty by having someone else agree on an otherwise unsubstantiated proposition. This notion was an important part of Mosaic legislation (Deuteronomy 17:6) and was still evoked in New Testament times (Matthew 18:16).
The masculine noun תאם (to'am) occurs in the Bible four times and only in plural. It denotes the twin boys Jacob and Esau (Genesis 25:24) and Perez and Zerah (Genesis 38:27). The groom of the Song of Solomon equates the breasts of his bride twice with twins of a gazelle (4:5, 7:3).
From our noun comes the denominative verb תאם (ta'am), which may mean to bear twins (Song of Solomon 4:2, 6:6), although twice it's used to describe a feature of boards that were installed in the back of the tabernacle (Exodus 26:24, 36:29). These boards were probably A-frames, two planks joined at the top and standing on their free ends.