It has become popular in modern culture to claim honest and admirable character, but deny respect or honor of God. People seem to want to "be a good person" without any standard or system of values or restriction on behavior.
In this Psalm David declares these men to be hopelessly lost. "They are altogether become filthy."(KJV) We often use fool to mean silly or lacking in understanding, but here it means depraved. In this instance it means deliberately blind to the absolute proclaimed truth of righteousness.
Frederich Nietzsche was the Prussian philosopher who proposed the notion that God is dead because of the treatment of humans. God is dead and we have killed him. We must find some other foundation for our society since there is no base to rest on now.
David recognized the philosophical argument, but he also saw the flaw in the argument. Human reasoning is not sufficient for the task. Only God in His righteousness is able to secure salvation for man. The poor, the wretched, the weak, and the sinful retreat to Him and find comfort.