Since Space is Divisible in infinitum, and Matter is not necessarily in all places, it may also be allowed that God is able to create Particles of Matter of several Sizes and Figures, and in several Proportions to Space, and perhaps of different Densities and Forces, and thereby to vary the Laws of Nature, and make Worlds of several sort in several Parts of the Universe. Isaac Newton, Opticks, Query 31; Newton 1730: 379-80.
In the Principia, Newton is very careful not to offer an explicit cosmogony. The first edition of the Principia ends with the (Epicurean) suggestion that comets bring the seeds of life from one solar system to another and there is a kind of intimation of a cycle of life (and, by implication, an eternal return of life and catastrophe also familiar from Descartes's philosophy) under the guidance of a providential, but not especially Christian God. He repeats the thought in a famous letter to Bentley, “there might be other systems of worlds before the present ones, and others before those, and so on to all past eternity." (Newton 2004, 102.) The second edition of the Principia, closes with a more explicit (heterodox Chrsitian) theology in the General scholium, where Newton argues that a cosmogony that would explain the existence of the visible universe will have to posit a Designer-God. (I have argued elsewhere that Kant shows you can develop a plausible cosmogony without a designer.) The Queries to the Opticks, provides more detail on Newton's speculative cosmogony. Here I want to offer some reflection on what the quoted passage implies for his views on laws of nature and possible worlds.
First, a note on Newton terminology: the universe can (but need not) be composed of different worlds. Ordinarily when Newton uses 'world' he means thereby to refer to a solar system. Newton recognizes that the universe could be composed of different worlds that coexist (in the General scholium he remarks [recall] on the beauty of the night sky to aliens in other worlds). A 'system a worlds' is a collection of solar systems (we would say, a 'galaxy') that, presumably, share in a uniform motion. For in the scholium to the definitions of the Principia, Newton shows that in order for the First Law to hold for the centre of mass of a closed system of interacting bodies, the Third Law must hold for the interactions among the bodies (for details see my work with Chris Smeenk here ). [In addition, in Corollary 5 to the Laws he makes it clear that the relative motions of a closed system of bodies are not affected if the entire system moves uniformly without rotation.]
Second, Newton also uses 'world' in a metaphysically richer sense. A world in this sense is constituted and characterized by the kinds of “particles of Matter” and forces that are to be found in it. The matter and forces of a world can be described by laws of nature. Newton's attitude toward matter and forces is realist (they are part of his basic ontology); matter and forces ground the laws of nature, which are derivative: note Newton's "thereby." In fact, Newton's treatment of laws of nature in the passage quoted from the Opticks is compatible with a very deflationary picture of laws of nature (they could be merely calculating devices), but it's also compatible with a less nominalist interpretation of them (that is, they are really existing second causes). Either way, Newton's laws are not primitive or productive in the sense that, say, Maudlin's treatment of laws are (recall).
Third, Newton's empirical, "laws of nature are not necessarily universal laws.+ They only hold of 'worlds' (in the metaphysical sense). Thus, Newton's position is compatible with (a) the universe having more than one kind of 'law of nature' each holding only for a different world (or system of worlds) or (b) the universe having one set of laws of nature that cover all the systems of worlds. In fact, the possibility of (a) helps explain that throughout Book 1 of the Principia, Newton also explores the characteristics of models with hypothetical force laws unlike the ones we find in nature. A universe that is like (a) would require causal disconnectedness among systems of the world (of the sort that [recall] Huygens posited for his alternative vortex-based theory).*
Fourth, the previous paragraph shows that Newton recognized that the empirical support for his laws of nature were limited in a sense. The evidence is biased to this-worldly observations. Below I return to this point when I discuss Newton's third and fourth rules of reasoning which push one to move from claims about matter in this world to the the matter in the whole universe.
Fifth, it is notable that Newton does not argue from God's power to the conclusion that the laws of nature could vary locally, but rather from the nature of space and matter. It's the divisibility of space and the possibility of a (local) vacuum that allows that matter could come in different kinds. (Newton takes Boyle's work on the air-pump and his own work on planetary and comet motions/trajectories to show that empty space is more likely than not.) One may wonder why a space/vacuum and density of matter are related. It turns out, that Newton (see, especially, Proposition 3.6, Corollary 3) relies on the counterfactual assumption that if matter is fully compressed to eliminate all interstitial void spaces, it would be of the same density. [In the second edition this was reworded so as to remove the commitment to atomism (see Biener and Smeenk for more on this).]
Sixth, one may wonder why Newton does not treat the laws of nature as universal. For, the third rule of reasoning reads, "Those qualities of bodies that cannot be intended and remitted and that belong to all bodies on which experiments can be made should be taken as qualities of all bodies universally." Newton's position relies (as the long commentary on the third rule shows) on the distinction between universal and essential qualities of matter. On my reading (defended elsewhere) essential qualities of matter are for Newton those that are required necessarily for matter to be matter. Universal qualities of matter are metaphysically optional. The third rule is a claim about how matter should be taken within the context of research. That is the third rule offers a bold generalization from the empirically available domain to domains beyond our experimental grasp. George Smith has explained the epistemic pay-off from doing so (in light of Newton's subtle methodology). For the fourth rule claims that "In experimental philosophy, propositions gathered from phenomena by induction should be considered either exactly or very nearly true notwithstanding any contrary hypotheses, until yet other phenomena make such propositions either more exact or liable to exceptions. This rule should be followed so that arguments based on induction may not be nullified by hypotheses." The fourth rule teaches us that the pay-off to such inductive boldness is the ability to find other phenomena that make such propositions either more exact or liable to exceptions.
Seventh, it follows that within the context of research, Newton advocates (b) the universe having one set of laws of nature that cover all the systems of worlds; and that within that context the possibility of (a) is not allowed to be used to nullify (say) the universal character of gravity. This is the context that is privileged ontologically. But Newton clearly allows that, in a different register, one can speculate about alternative possibilities that may turn out to be fruitful in the future. That is to say, Newton recognizes (with a nod to Kant, Cassirer, and Michael Friedman) a dynamics of reason that operates alongside empirical inquiry into nature.
Finally, the passage is relevant for Newton's views on modality. Newton treats infinite beings (God, space, time) and finite beings (matter, forces, laws) as subject to different modal rules. In particular, in the General Scholium he argues with the principle that if some effect Y is universal temporally and spatially, then we can infer or posit as the ultimate cause something that itself is necessary in a way that accounts for Y (recall my treatment of Newton and Clarke). But as the passage quoted above, from the Opticks reveals, Newton does not allow the inference to go in the other direction: a necessary existing Being could have created an alternative reality when it comes to finite beings and the laws that govern particular [systems of] worlds.