It seems reasonable to conclude that the Psalms were written over time by various authors, but can one reasonably date the final compilation of the Psalms? Were they compiled during the exile? Shortly after the exile? Perhaps even later still?
Some main ideas in answer to your question (note, I am not a professional in this field, this is the result of some research):
According to the article An Analysis of Psalms,
After the exile, Ezra the priest compiled and arranged all the present psalms together into the five divisions of 150 psalms
(emphasis mine). Further, an actual chronological time is stated in the article Psalms (NIV Bible webpage) as being in the 1st century AD, as the Book of Psalms being referred to in Luke 20:42 and Acts 1:20, specifically for your question, the article suggests when its compilation occurred, with
It was put into its final form by postexilic temple personnel, who completed it probably in the third century b.c.
tl:dr the literature suggests that the Book of Psalms was compiled some time after the exile, possibly by Ezra, but seemingly around that age.