Something needs to be done on an eclipse, some the powerful archmage wishes for there to be an eclipse. They were cautious enough to mention it should happen almost immediately, so that the wish wouldn't transport them to a time when there was or will be an eclipse. Could their wish cause a actual eclipse where a moon gets moved to cover the sun?
And after the wish, if a moon gets moved what happens to it?
Since this is "D&D General" rather than any specific edition, this question is somewhat difficult to answer, but...well. The general understanding is that
wish is the "Temporarily Become DM" spell, with the only consequences being whatever the DM can get away with inflicting upon the party without causing a riot. This is why it is both always, always,
always the spell qualifying full-casters desperately reach for if there's even the slightest hope of hitting level 17...and why it's the spell every DM dreads having to adjudicate.
Because it's pretty much literally "there are no rules, the player makes up whatever they want to do, and the DM inflicts upon them whatever
they want to do, good luck!" DM just no-sales it? They're a stuffy boor who poops on the players' creativity and fun. DM okays a massive effect but inflicts a terrible cost? Now they're not just shutting down creativity and fun, they're
punishing it. DM okays it and doesn't inflict a severe penalty? Woohoo, we can do whatever we want, DM is a doormat (until they snap and become one of the previous two)!!!
It's pretty much the perfect storm of how to create a spell that is an almost guaranteed no-win scenario for the DM...and an absolute powder keg for the player. It may demolish any wall blocking your progress, or blow up in your face so spectacularly it's not even worth touching.
As for the actual question,
presuming you're referring mostly to 5e? Sure, the final listed option for
wish is literally "alter reality" so...sure. All a solar eclipse
is, is a moon (or other body) getting between the primary star and the body the observers are located on. Problem is, altering the celestial mechanics of a world is often an extremely,
extremely dangerous and harmful thing. Massive earthquakes that can level cities, tsunamis that wipe whole regions off the map, volcanic activity that sets the land aflame, disruption of
future prophecy and thus unraveling the threads of fate, all sorts of horrible things can come from this.
Personally, if I were doing this myself, I'd instead wish that a rogue planet passed between the planet I'm living on and the star it orbits, large enough to provide a sufficient one-off eclipse at whatever distance it is (presumably about a quarter of the distance between the planet I live on at the star I want to eclipse). At those distances, so long as that rogue planet never passed within several million miles of any other planet, the gravitational effects would be essentially nonexistent. All that would happen is that there would be a temporary "new star" in the sky for however long it takes for the planet to get close enough to be visible, transit, and then far enough away to not be visible anymore.
That way, you get all of the benefits of a spontaneous, unforeseeable bonus eclipse, and none of the negative gravitational or geophysical effects that would come from disrupting the orbital system. There could still be issues (e.g. the rogue planet could have alien invaders on it that are extremely eager to escape their dying world and conquer the beautiful new one just delivered to them), but that's "solvable problem for another day" rather than "I just
completely ruined the world to make this happen".
As for the effects on the moon itself? As long as its orbital speed and momentum were properly realigned, all it would experience are some moon-quakes and (if it has an active core) some volcanism. I assume this moon is similar to ours, meaning, a barren surface with no life and little atmosphere. One fun consequence could be that, if this moon is also tidally locked to the planet like ours is,
you've just changed what the far side of the moon is. Meaning this act has permanently altered how this moon looks to the people of this world. That's a cool and thematic consequence, and if the eclipse
does cause massive catastrophes and destruction, the caster who did it could become associated with the "Changed Moon" and being a horrible scourge who ruined the world for some stupid forgotten reason (even if that ruined-the-world thing was absolutely necessary to prevent far worse ruin).