I've read the judges' ruling in full vetuste -- although I can't say I necessarily understand the entirety of the argument, being a non-expert in legal matters. It is available here, for anyone who wants a look:
https://www.judiciary.gov.uk/wp-content/uploads/2016/11/judgment-r-miller-v-secretary-of-state-for-exiting-the-eu-20161103.pdf
Essentially though, the point is that withdrawal from the EU would fundamentally affect the rights of British citizens, and to carry out such a change is not within the powers of the Crown (ie, the Prime Minister and her cabinet) without express permission of Parliament; since, in turn, these rights were granted by passing an Act of Parliament (European Communities Act 1972); and only Parliament can undo its own decisions.
The judges take great pains to stress that this is about the legal issues surrounding the referendum decision, not the decision itself. The issue doesn't exactly arise in the other direction, as of course a Remain vote would mean that nothing in law needed to be changed.
Incidentally, the question of whether or not the 2015 Referendum Act gave the Crown this power was answered in the negative by David Davis himself: it simply isn't the case that the referendum had any legal power, or handed any authority to the government to exercise the decision, as stated in paragraph 105 of the above document: "[David Davis, the Secretary of State] does not contend that the 2015 Referendum Act supplied a statutory power for the Crown to give notice under Article 50."