Who is going to harm you if you are eager to do good? 14 But even if you should suffer for what is right, you are blessed. “Do not fear their threats[b]; do not be frightened.”[c] 15 But in your hearts revere Christ as Lord. Always be prepared to give an answer to everyone who asks you to give the reason for the hope that you have. But do this with gentleness and respect, 16 keeping a clear conscience, so that those who speak maliciously against your good behaviour in Christ may be ashamed of their slander. 17 For it is better, if it is God’s will, to suffer for doing good than for doing evil. 1 peter 3:13-17

When situations are against us and when we are persecuted for our faith or for not doing anything wrong what we shall do? Peter gives an answer here.
The apostle addresses the problem of unjust suffering directly, which is here understood to be a potential problem for all Christians. Bible says When we do not retaliate to the persecution or the way that people does and then we are blessed in the Sight of God.

Peter quoted Isaiah 8:13-14 to back up his warning: “But in your hearts Set apart / Revere Christ as the Lord (1 peter 3:15)”. The setting of the Isaiah is significant here. Ahaz the king of Judah, faced a crisis because of an impending invasion by the Assyrian army. The kings of Israel and Syria wanted Ahaz to join them in alliance but Ahaz refused, so Israel and Syria threatened to invade Judah! Behind the scenes, Ahaz consulted himself with Assyria! The prophet Isaiah warned him against ungodly alliances and urged him to trust God for deliverance. “sanctify the Lord of the hosts (armies) himself; and let him be your fear and let hm be your dread (Isa 8:13)

As Christians when we face crises, we are tempted to give in to our fears and make wrong decision. Our enemies can hurt us, but they cannot harm us. Only we can harm ourselves if we fail to trust God. Generally speaking, people do not oppose us for doing good, but even if they do, it is better to suffer for righteousness sake than to compromise our testimony. Peter is concerned that Christian believers will be able humbly and respectfully to defend their hope in Christ to anyone who might ask, even if legal charges are in view for some. “Hope” in 1 Peter is a term referring to the future aspect of salvation, for it is into a living hope that Christians have been reborn through the resurrection of Christ (1:3).

Jesus said in Matthew 5:10,11 Blessed are those who are persecuted because of righteousness, for theirs is the kingdom of heaven. Blessed are you when people insult you, persecute you and falsely say all kinds of evil against you because of me.