If you are the tank, then you need to engage when your team is in position. If you're not the tank, then wait for the tank to engage before you run headlong into the enemy team.
General rule of thumb on engaging is to make sure your team is ready for it. If they are, then you wait for the enemy to be out of position, i.e their tank is in the back of the team, their carry is too close to you, 1 or more of them are not in the area you plan on engaging, etc. If there's trouble brewing in mid-lane and someone on their team is pushing bot, then it should be a 5v4, which means your team should be able to win the ensuing team fight.