The first Summer Sun Celebration was celebrated not long after Nightmare Moon's defeat and banishment, the event mainly commemorating Celestia's defeat over her foe. Upon Season 6, Celestia made known that the summer sun celebration no longer presented the defeat of Nightmare Moon, but instead the return of her dear sister.
The exact process itself, both prior and after Luna's return, had the sun and moon being moved side-by-side: the sun rising as the moon fell as a visual representation to Nightmare Moon's defeat. First the moon would be lowered, and then Celestia would fly up alongside the sun, and use her magic to bring forth the next morning from there. According to Pinkie Pie the last summer sun celebration had Twilight Sparkle fly in and release a magical flair when the moon and sun line up.
Nightmare Moon made her return on the 1,000th year of the Summer Sun Celebration, almost halting the event altogether until Celestia returned, and subsequently raised the sun. It was almost stopped again when Celestia and Luna were captured by the Plunder Vines, but once again went on without another hitch once they were freed, and when the Mane Six had come back, Twilight becoming involved in it.
The celebration became a focus in Waving the Red Cape, when Celestia had to make a magical shield around Canterlot in order to keep Solitaire from destroying it as the event was being prepared. This Summer Sun Celebration was to now commemorate the return of Luna instead of the fall of Nightmare Moon.