RAW
The base 3.5 SRD includes Greater Teleport which :
functions like teleport, except that there is no range limit and there is no chance you arrive off target.
It's a 7th level spell, though it would clearly work from a RAW perspective. It's technically travelling through the Astral plane, but since you're already considering teleport, that kind of technically may not matter for your situation.
RAW-like
Paizo introduced Interplanetary Teleport for Pathfinder. It's a 9th level spell, but one which is clearly intended for traveling between celestial bodies.
If travel to the moon is expected to be fairly common, some enterprising organization may have set up a handful of Teleportation Circles to facilitate the journey.
If some organization is backing the PCs on their initial exploration of the moon, perhaps they've built a ship of some sort; the Spelljammer setting is built around using spaceships to travel between planets. If the journey is meant to be boring for the characters, this could all be hand-waved at the table "several long weeks later, you arrive at the moon".
Anecdotal
Anecdotally, I have heard tell of campaigns that basically treat other planets/moons as different planes and let characters use Plane Shift to move between them (they would also let effects that allow creatures to become attuned to planar traits to have similar effect when traveling between celestial objects). That would give players access to the moon as a 5th level spell (via a Cleric), the same level at which Teleport becomes available. Second-hand though it may be, that sounded like it worked for them.