Needless to say, God and evil are polar opposites. It is surprising to many, therefore, that Isaiah 45:7 actually says God creates it. Or does it? In truth, this depends on which translation you use. The KJV renders the verse "I make peace, and create evil". But the Hebrew word rendered "evil" in the KJV actually has other meanings, which shine through in other translations. The HCSB and NIV render it "disaster", whereas the NKJV and ESV go with the word "calamity".
So why does the KJV use the word "evil"? This isn't a mistranslation. Rather, the word "evil" is a much broader term than the average person recognises. According to Merriam Webster, evil is "the fact of suffering, misfortune, and wrongdoing" and "Something that brings sorrow, distress, or calamity." From this, we see that while the word "evil" can, and more often than not does refer to moral evil, it can also refer to things that have no consciousness what so ever. Even a natural disaster can be called "evil". And indeed, the AMPC renders this verse "(...) I create [physical] evil (calamity)...". Furthermore, punishment, because it causes suffering and/or sorrow, can be called "evil", even though it is actually a good thing when an evil doer receives a just punishment.
In context, Isaiah 45 discuses God's reaction to Israel's moral behaviour. When Israel does good, they prosper. When Israel does evil, they suffer. We see, then, that the "evil" God creates is not moral evil, but rather, as more modern translations render it, disaster and calamity in response to moral evil.
In the modern day, we are blessed to not only have a range of English translations, but also have quick and easy access to plenty of commentaries. However, as always, context is king. You don't even need to leave the KJV to understand any of the above, because simply reading Isaiah 45:1-13 should show us that moral evil was never in view here. What is the opposite of light? Dark. But are peace and evil opposites? Not necessarily. Sometimes, evil can appear peaceful. The opposite of evil is good, but the verse does not say God makes good. The opposite of peace is not evil, but rather, calamity, chaos, disaster etc. are much more sensible renditions. Therefore, we can see that moral evil is not in view here. Rather, things which can still be described as evil. The "evil" God creates are unfortunate symptoms of an evil world. Sin brings with it many consequences. We see, then, that Isaiah 45:7 is a lot less troublesome than it initially appears. God cannot be blamed for evil, but praised for His perfect Holiness.