Science fiction novelists, of course, are obliged to create
worlds where the universe the stories take place in follows the known laws of
physics and they are expected to provide reasonable plausible explanations for
deviations from these rules. Of course, they do not always do so rigorously.
Desert planets and ice planets abound in SF, and it is hard to know where the
breathable atmospheres come from on these worlds, since free oxygen is produced
by plants and phytoplankton via photosynthesis (or their alien equivalents),
which are largely absent from these worlds. In any case, one of the fun things
about fantasy is that you can create a world that does not obey the laws of
physics if you so choose. If you, for aesthetic reasons, want to set your story
in a world with floating chunks of rocks, a pink sky and three purple moons,
then you can do so.
However, many writers of high fantasy, in the tradition of
J.R.R. Tolkien, elect to set their stories in worlds that are a parallel Earth, the Earth of a bygone age, or a world that is essentially
Earthlike in that it is round, goes around its sun approximately once a year, is populated by humans and familiar animals (and perhaps a few fantastical beings or creatures familiar from
human mythology), is approximately 3/4 ocean and 1/4 land and where the laws of
physics seem to hold sway, with some exceptions made for whatever magic system
operates in the world. These types of fantasy worlds are generally expected to
conform somewhat to the norms and expectations that exist on Earth with regards
to weather, seasons, heavenly bodies and so forth. For the
most part they do, though a writer has more latitude with this than a writer of
hard SF does.
Most of the time, these worlds possess a single moon of similar size and period to ours. I
can't think, off the top of my head, of a traditional high fantasy novel where
the world lacked a moon, and I've run across very few that had more than one
moon. In
addition to being an inspiration to poets and lovers, our moon has very likely
influenced the evolution of many life forms, has modulated our axial tilt (thus producing less severe climactic fluctuations on both large and small time scales than we might experience if moonless), and of course its
gravitational tug of war with the sun produces a tidal cycle that is much more
intense than what would exist with only the sun's gravity tugging on the
earth's oceans.
Many writers of fantasy (and writers of "real world"
fiction as well) seem to be completely unaware that the moon does not usually rise when the sun goes down
and set when the sun comes up. This has always amazed me, since it is often
quite possible to look up in the sky in the middle of the day and see the moon
(this is particularly easy to do when the moon is in its first or third
quarter). The only time the moon actually rises at sunset and sets at sunrise
is the one day (out of approximately 29) that it is full. When the moon is new,
it actually rises at sunrise and sets at sunset. It's up there, but since the
entire surface that faces the Earth is facing away from the sun, we can't see
it (except on the rare occasion that it passes directly between the Sun and the
Earth and causes a solar eclipse). When the moon is at "first
quarter," it rises at noon and sets at approximate midnight (of course,
time zones and locales differ in how closely local midnight coincides with the
true midpoint between sunrise and sunset). When it enters its "last
quarter," it will rise at approximately midnight and set at approximately
noon. Each night of its cycle, the moon rises and sets a little later.
I am not sure why so many writers mess this up. Perhaps it's
because people living in the modern world just don't spend that much time sky
watching, so they really don't notice that the moon is not usually visible at
the times of the evening when they are out and about. Or maybe it's just due to
the romantic idea that the moon is to the night what the sun is to the day.
Writers will frequently have their characters "know" that dawn is
near because the moon is setting, for instance--never mind that the setting
moon in question is a slender crescent. Perhaps they do it this way because
they think it would be tedious to have their characters acknowledge the phase
of the moon and use their knowledge of its current position to estimate time.
I'm not sure why it is especially tedious to say, "The first quarter moon
had set hours ago, so Bob knew that dawn was near." In fact, the presence or absence of the moon for all or part of the night could be used as a plot device. For instance, a spy might choose to time his foray into enemy territory to coincide with a time in the lunar cycle when the moon will be absent for all or most of the night.
Now a fantasy world could ostensibly be a flat world (as was
C.S. Lewis's Narnia) where the moon and sun both make a daily circuit. In such
a setting, you could argue that the moon's phases (if present) would be caused
something other than the percentage of the moon's Earth-facing surface that is
currently facing the sun. And if the moon of your world is actually the moon
goddess's chariot being driven across the night sky, the same is true. But if
your tale takes place on a round world that goes around its sun and which has a
moon that is a celestial body that circles the world in the same direction and
at a similar speed, then its phases will be identical to what we see on Earth.
There would be no way for a crescent moon to be rising at dusk and setting at
dawn.