Climate change played a role in the deaths of thousands of puffins in Alaska, according to a study.