These are tough words, but filled with hope and assurance. The word translated as "when" is hotan and is used to indicate something that will definitely happen but at an uncertain time/date. We might read it as "when they bring you before the synagogues and the rulers and the authorities, and it is going to happen..." Jesus' use of hotan was a way of telling His disciples that these difficulties were not possibilities. They would definitely happen.
"Synagogues and the rulers and the authorities" is a reference to both the Jewish religious leaders and the governmental authorities. Every level of authority over them would demand an answer for their faith.
It's hard to understand the impact these words must have had on the disciples. They were, for the most part, unlearned, blue collar workers, not men from the upper echelon of society.
Peter carried a sword. He was apparently accustomed to defending himself by brute force, not the power of words. To be brought before religious and governmental authorities meant risking everything, for the two bodies had incredible control over their lives. These were not men who were accustomed to defending themselves with words. They weren't eloquent public speakers.
Let's put ourselves in these men's place for a moment. Jesus told them, "You're going to be dragged into court for following me, and you'll have to speak up to defend yourselves. You won't have a lawyer to help. You're on your own." That's a chilling thought, isn't it?
Here's the good news. No man would help them BUT the Holy Spirit would "in that very hour" (just in the nick of time) tell them exactly what they needed to say. Instead of another man, Jesus was sending His own emissary, the Holy Spirit, to help them.
Suddenly, the situation must have sounded much better. Even though the Holy Spirit had not yet filled them, the idea must have been a relief. They were not alone.
It's one of the things I love the most about Jesus. I am not alone. No matter what I face. No matter how difficult the situation. No matter to whom I have to answer. I do not answer alone. I do not cope with my circumstances alone. The Triune God, in the form of the Holy Spirit, is with me, helping, providing, enabling me to do what must be done, to say what must be said.
"Do not worry," Jesus told them. He knew our propensity to worry and aimed to head it off. There is no need to be afraid, to agonize over what is to come. The one who forgives our past and directs our present is in control of our future, as well.
Will hard times come to us? Yes. We may not experience the kind of persecution the disciples faced (although I think we will), but we will encounter difficulties. The wonderful news is that our Lord has the future firmly in hand. He has a provision for every need we have. There's no need to fear.
Take heart, He has overcome the world and He holds you in His loving hands.
Our Father, who holds the past, present, and the future, give me faith to trust you in the hard times, to honor you with my words and to stand firm for Jesus, no matter what comes my way. Free me from my fear and help me cling to You. In Jesus name, Amen.