The short answer is: experiments. The SEO community is very good about sharing results of tests and anecdotal evidence about rank fluctuations. Collectively, we can draw conclusions about what factors affect rankings from there.