Major Spoilers ahead
I have finished the game with the brotherhood ending, wanted it to be with the minutemen ( trouble finding a way ) but anyways here's what I think about the 2 factions and the other ones.
Minutemen - They started out weak and ended up strong. In all of the factions, only the minutemen care about the people. Food , water, power , shelter, defense and so on. No other faction does this for the settlers. You can also see minutemen patrolling around the commonwealth to fight against the baddies, super mutants etc. Even if you have setup a lot of settlements in the commonwealth , it is not enough to fight against other groups outside the commonwealth. And this is why I think the brotherhood partnership is ideal.
Brotherhood - We know that all they care about is technology and military power but if you observe the random events in the game. They are the 2nd faction that fights against your enemies, mutants , animals, raiders etc. Risking their lives to fight the bad guys , that explains the numerous vertibird crashes. Still they are eliminating the hostile threats in the wasteland.
---------------
Now the baddies
Railroad - Small group. They only care about synths. I think even Desdemona or almost all of the RR are synths. There are so many settlers in the commonwealth that need help but they don't even bother helping them. In fact I recalled one of the options to let the railroad join the minutemen, side with minutemen or railroad.
Institute - Killed your wife, cloned your son's DNA , experiments, responsible for the deaths of the people in the commonwealth. I don't think all of the institute is bad. Just a few departments , advance robotics and so on, anything that deals with the creation of synths. Their biggest mistake was making synths when it fact they are perfectly capable of just creating ordinary less advanced robots to do their work. And maybe do something like increase their population hehe.
------
Beyond the commonwealth
This is why I think Minutemen + Brotherhood teaming up is good for both of them. With so many threats from the other us states, ex NCR, or maybe even future countries. They have the best chance in defending the people of the commonwealth.