Ocean floors act as a repository for sediments collected over millions of years. These include the rocks, sediments, phytoplankton, fossils, etc. that settled directly at the ocean floor and those that were brought to the ocean by rivers, wind and other natural media. These sediments (including fossils) contain a record of how the climate was when they settled (or were dislodged from their original location). These samples can be studied to figure out the climate variations throughout the sediment history. The information that can be collected from these sediments include ocean temperature, ocean circulation, climate changes and evolution of life in the ocean. The ocean floor is a relatively peaceful place as compared to other parts of Earth and hence stores the samples in an undisturbed state. The samples give us an idea of what the ocean temperature was during the life of the sediment (like for phytoplankton samples). Another measure of ocean temperature is the ratio of calcium and magnesium in sediments, the absorption of which is a function of ocean temperature.
Hence the sediments collected from the ocean floor can give us a peek into the history of the ocean's temperature and thus climate change.
Hope this helps.