Great question! I really don't know!

I'm assuming they are able to make inferences based on how close a planet is to a star and what type of solar system it's in, but still. Pretty nuts.