The best explanation I have seen of the trilogy arc:
The first one should end on a happy note, with hope. Using Star Wars as an example or even Lord of the Rings is applicable.
The first one Luke was found, there was hope, there was a forward position, he also lost his mentor, so it wasn't all sunshine, but there was a level of victory at the end.
Same with Lord of the Rings, everyone had been united, they knew what they had to do, they were on their way to triumph over evil.
The second one can be tragic, because the audience is already vested in the story.
Han solo is frozen, there is a lot of pain and suffering, Luke is nearly caught, and they narrowly escape with their lives. Their next step is clear, retrieve Han. Luke also finds out that his enemy is his father and his father is evil, he loses his hand, another city falls to the empire.
In the Lord of the Rings, the party is broken to pieces, they are scattard. war has begun they lose the wizard (if the sequence of events are off I apologize, I need to watch it again.) and their situation is dire, frodo is losing himself to the ring, everyone knows it.
The third one has to have some kind of change, usually for the dire. This is when you can have a tragic ending, Luke's father turns good but sacrifices himself for his son, so Luke has lost just about everyone he cared about and knew. All of his family save Leia, both of his mentors and teachers, but they also had some celebration of triumph over the empire.
Lord of the Rings, Frodo chooses not to throw in the ring, and instead tries to escape, the group is nearly obliterated, making a final stand, and the forces of evil nearly triumph. But the desire of the ring is so great is ends up being it's own downfall and even after the triumph frodo is never innocent again, the marks of his journey weigh heavily on him and he ends up leaving with his uncle to the unknown. The king does get to marry the girl he loves, but they both also know that it will be a bittersweet life, she will watch her husband grow old and die while she remains the same, and left alone in this world where most if not all other elves have traveled to the east or west, wherever they went.
You don't have to have a sappy ending to be a triumph, but do remember you are writing one large story with three smaller self contained stories within. If you don't have that satisfaction and leave it on a cliff hanger chances are people won't go back for the second and you will have a failure on your hands. Big overall story arc, rebels against the evil empire, good guys against an evil overlord, carrying a cursed ring to it's destruction, but within that you have smaller very real stories that have their own beginning, their own middle, and their own endings.
Good luck and sorry for rambling.
ETA you can also look at failed trilogies for what not to do.
IE The Matrix.
Over all story arc began as humans struggling for escape from machines and a war against the machines. Tool = Neo. In the second one the main bad guy started to shift from machines to Smith (Very bad to shift your overall story arc at any point!) Final one, Neo vs Agent Smiths = Major Suckage and no story line, lost plot, multiple plot holes. Also they eliminated some of the surviving characters from each one and they are never heard or seen from again, don't drop main characters who your audience knows and loves just because.