1. To make Luke's own construction more obvious
A transcript from a 1981 Return of the Jedi story conference shows a conversation between George Lucas, Richard Marquand, Lawrence Kasdan, and Howard Kazanjian that works out a color change as a way of making it more obvious that Luke has constructed a new lightsaber after he loses his old one (along with his hand) on Cloud City.
Lucas: The way I was explaining it in the scripts before was that he made another one. But it's going to be impossible, given the structure of the way the film is now, to explain where that lazer sword came from.
Marquand: It's a line of dialogue later.
Lucas: Well, I don't know if we even need to explain it. The worst thing about that is you get a letter in Starlog magazine. Big deal.
Marquand: He made it, that's the answer!
Lucas: That's not going to drop the audience out of the film. People aren't going to stand up and say, "I just don't buy that, I'm leaving". But you will get lots of letters, so we'll make a form letter explaining that Luke made it.
Kasdan: Maybe it should be a new colour.
Lucas: Yes, it could be totally different looking. We can work that out. But the idea running throughout the whole trilogy is: First he's given his father's sword, because his father lost it in the fight with Ben Kenobi: Ben cut his hand off and Vader fell into the volcano, so Ben then pried the lazer sword out of the hand and kept it for the son. So then what the father did was cut his son's hand and lazer sword off — and that was a way of severing the relationship between father and son. Not only did Luke lose his weapon and was castrated, but at the same time his father split that relationship. Luke was carrying his sword for his father. Now he is not doing that anymore. In this one, he's built his own. He has built his own lazer sword; he is his own man, he is not a son anymore. He is an equal.
Lucas believed that Luke constructing his own lightsaber illustrated a maturation in Luke - juxtaposing him with Vader - evolving from the naive farm boy carrying the legacy of his father to an worthy adversary and Vader's equal.
2. For better contrast when displayed against the Tatooine sand/sky backdrop
But somewhere along the line, they decided to stick with blue until some time in post production. It's normal for trailers to be put together quite a while before the final version of the film is ready so it's completely plausible that the shots of Luke in the trailer didn't include any footage that made the blue look bad but when they circled around to finish the entire Tatooine fight scene, the blue appeared more washed out than they had hoped.
This has been a well-known ROTJ factoid for as long as I can remember but I'm not 100% sure where the idea originated. I've seen references to the theory online going back as far as 2004 but I can't find an original source at the moment. I want to say I saw it in the VHS special features for the 90s Special Edition re-release but I'd have to dig those out to confirm.
Pablo Hidalgo, however, has confirmed this idea more recently, tweeting
Remember - Luke had a green one because the effects sequence had it against a blue sky. That's as deep as these things tend to go.
— @pablohidalgo October 18, 2016
and telling Vanity Fair:
“The intent was the lightsaber was going to be blue,” Hidalgo explains of the story that has passed into Star Wars lore. “In that universe, at that time, as far as anyone knew, lightsabers were red or they were blue.” But Luke’s weapon was changed to green so it would stand out against the bright blue sky and yellow sand, in scenes such as the Jedi’s daring rescue of Han, Leia, and the rest. “As much as we like to mythologize why it’s green and what that all signifies,” Hidalgo explains, “sometimes there are very pragmatic filmmaking reasons behind these things.”