You can join all three factions and safely do available quests for them until you come at the point of the MQ where you have to pick a side. Don't worry, you will know it when the time comes.
If you want to know the name of the quest where it will be the best to pick a side, it is:
to join the minute and men and stay on friendly terms with the BoS, you have to not accept fathers offer to join the instiute, or betray the instiute at the battle of bunker hill, or just start shooting up the instiute personel ( ie make them hostile)