How do they know all this stuff?
Tree rings! At least, as to droughts, sunlight, growth rate of trees and other vegetation.
The other things, from archaeological records, combined.
I'm very suspicious of the claim that only 8 million people died in the initial smallpox epidemic. After all, elsewhere in the Americas, it's known that the death rate among native Americans was ordinarily over 90% for smallpox ~ which is roughly double that found in native African, European or Asiatic populations.
Or, alternatively, there were several tens of millions more people in Mexico that no one knew about until the mid 1500s. Another alternative is that the Spaniards had only the slightest idea how many people lived in Mexico at any time, and even less idea how many died.
The encomienda system mentioned in the article didn't really get set up until almost everyone had died. This was more of a "Works Progress Administration" type labor program than slavery, the idea being that the Mexican population had been so diminished drastic action had to be taken to save society (as well as the recently Christianized native peoples). The Spanish get a bad rap on this.
To oversimplify: by studying tree-rings.