In Act III, the moon is the happy fantasy of Cyrano as he pretends to be a drunken madman that believes he has fallen from the sky. In Act V, it is his desired destination after death, since it is "the place for [him], [his] kind of paradise!" On the moon, he says, he can chill with other awesome dead guys like Socrates and Galileo.
You should know that the real Cyrano de Bergerac also had a thing for space travel; in fact, he published a collection of stories called The Other World that detailed these fanciful journeys to the sun and moon. That our hero, the fictional de Bergerac, is so intrigued by such fantasy is a reminder of his character’s romanticism and, often, his impracticality. It is only fitting that a character so lost in language and so poorly grounded in reality would be fascinated by the thought of travel to the moon.