There are at least three purposes for the prayer of thanksgiving:
1. To give honor to God. This is the primary purpose of thanksgiving—to acknowledge that God is God and that He has supplied us with all we have. Psalms 100:3-4 says it well:
Know that the Lord, He is God;
It is He who has made us, and not we ourselves;
We are His people and the sheep of His pasture.
4 Enter into His gates with thanksgiving,
And into His courts with praise.
Be thankful to Him, and bless His name.
Look also at Romans 1:20-23 to see the consequences of refusing to honor God and of not thanking Him.
2. To show our dependence on God. When we are grateful and thankful to God we show to Him and to the world that we are dependent on Him and that we desire to stay in that humble place of dependence, love, and trust.
3. To aid us in prayer. Thankfulness helps us in every other part of prayer. It helps in confession because when we express our thankfulness to Him our mind becomes more focused on God and therefore we are more apt to desire His forgiveness and cleansing.
Thanksgiving aids our praise because when we thank Him He does a work in our heart so that our personal gratitude overflows into praise. Likewise, the more we see how God is good to us and we are thankful to Him, the more we will see all the good qualities of God, and that He is not only good to us, but to all of His creatures; and so our thankfulness turns into praise.
Thanksgiving prayer is an inseparable part of petitionary prayer. In fact, God will not hear petitions that are not made with thanksgiving. This apparently is because without thankfulness our petitions tend to be with wrong motives. But when we remember to pray with thanksgiving it softens our heart and gives us right motives and the right attitude—an attitude of gratitude.
Thanksgiving also works to contribute to the overall purpose of prayer: to establish His holiness, His kingdom, and His will. When we are thankful in prayer we establish a position of dependence on Him and a loving relationship with Him as a son or daughter to a Father. Accordingly, because our thankfulness keeps us in that dependent, family relationship with Him, with an attitude of loving gratitude we are always working and praying to establish His holiness, His kingdom, and His will.