The general concensus seems to be that genealogies are boring, tedious, and unimportant. However, the genealogy in Genesis 5 is foundational to establishing a biblical worldview. At first glance, the genealogy in Genesis 5 may appear cluttered with random numbers— but these numbers provide important insight into key features of the pre-flood world.
First, Genesis 5 provides insight into the health of men in the pre-flood world. Excluding Enoch, the shortest lifespan mentioned in Genesis 5 is 777 years! Whatever the state of the world was before the flood, it can be safely concluded that something was very different. Some would argue that there was a difference in climate. Others would argue that humanity had not yet gained the many mutations present in humanity today.
Even more significant than quality of life, Genesis 5 contains a clear connection point between Adam and Noah. By adding the time periods together, it can be determined that Noah was born 1056 years after the creation of the world (and from this it can be calculated from later portions of Scripture that the flood occurred 1656 years after creation, when Noah was 600 years old — Genesis 7:6).
For those who believe that evolution and the Bible are compatible, the genealogy in Genesis 5 shows that such a belief is unreasonable. There are no gaps in the Genesis 5 genealogy. The flood occurred about 1656 years after the creation of the world. And from the flood, the elapsed time from Noah to Abraham can be known through Genesis 11:10-32. Clearly, no room is present in Genesis for millions and billions of years.
Enoch: A Prophet in the Pre-Flood World - Genesis 5:21-24
The Genealogy Introduced - Genesis 5:1-2
Age of the Earth - The Christian Worldview
Man In the Image of Man - Genesis 5:3
Natural Death - Genesis 5:4-5