Psalm 104 is one of the "great" passages (prayer/meditation) on the Creator. David is praising the Creator for His many marvelous works in creation. It appears he is "thinking through" Genesis 1 and then reflecting back on the Lord.
Dr. Scripture proposes that Psalm 103 and 104 were originally a single composition of David that was then subsequently divided into the two separate Psalms we have today. Together they are a lengthy mediation upon the Creator and His works.