“Rejoice always, pray continually, give thanks in all circumstances; for this is God’s will for you in Christ Jesus.” (1 Thessalonians 5:16-18 NIV)
Our joys, prayers, and thankfulness should not fluctuate with our circumstances or feelings. Obeying these three commands -- be joyful, keep on praying, and be thankful -- often goes against our natural inclinations. When we make a conscious decision to do what God says, however, we will begin to see people [and circumstances] in a new perspective. When we do God’s will, we will find it easier to be joyful and thankful.
Paul was not teaching that we should thank God for everything that happens to us, but in everything. Evil does not come from God, so we should not thank Him for it. But when evil strikes, we can still be thankful for God’s presence and for the good that He will accomplish through the distress.
-- From the “Life Application Study Bible”