Your question is hard to address since there are no specifics, but I would be glad to give a Lutheran perspective of why addressing politics in a sermon may be not only acceptable, but is an important part of a pastor’s job.
We have a doctrine that makes a distinction between the temporal civil realm and the heavenly realm. The temporal realm is concerned with running things in the here and now to accomplish God’s will. This includes the civil authorities as instruments of God to administer justice in the world through the application of the law. These God ordained institutions are concerned with how man fulfills his obligations to his fellow man (see Romans 12 and 1 Peter 2 for examples). The heavenly realm is concerned with our standing before God. This includes the proclamation of the gospel to bring men to salvation by faith before God. Both of these realms belong to God.
Going back to the role of the civil realm to administer God’s justice through the application of the law…The civil government, whether they acknowledge it or not, is still accountable to God for performing its role in administering justice. So when for example, unjust laws are passed or unjust actions are done in the name of government, the civil authorities are accountable to God (see Psalm 82 for example). The pastor, as a spokesman, can and should speak up to address egregious examples of the civil government violating its role as administrators of God’s justice. The purpose is to bring those agents of civil governance to repentance. So when the government, for example, passes unjust laws allowing for things like the murder of unborn children, the Church can and should speak up and address these things. I hope this offers some clarification for you.