Scientists are writing a recipe for the perfect planet—a place not too cold, not too hot, not too toxic and chemically suitable for life as we know it—as they brace for a torrent of new discoveries about potentially habitable alien worlds.

All told, there may be billions of planets hospitable to life in the Milky Way galaxy alone, dozens of them much closer to Earth than previously suspected, several new star surveys and statistical studies suggest.

"We...