So titles like Alexander the Great, Suleiman the Magnificent, Edward the Confessor etc.
These are not titles, consider them more like nicknames ( I do not know if there is a specific term in English though ) but they are not titles.
As for whom decided what nickname should a monarch be " given " it depends. you pretty much have to research for every individuals how and when X nickname appeared.
But generally they could have appeared during the life of the individual because an author such as a biographer decided to use X nickname, by the people during the life or after the death. It can also come from long after the death of the individual, often with 19th century historians.
Here is an example :
Louis XV of France was nicknamed the Well-beloved during his lifetime after he recovered from a disease and came close to die. The popularity he enjoyed during his youth participated in him becoming France's beloved King. However he did not enjoy this popularity for his whole life and he ended being more disliked than beloved.
You have, for most of them, to look individually for the origins of these nicknames.
The Swedish estates parliament granted Gustav II Adolf )Gustavus Adolphus) the posthumous honorific "den store" ("the great") in 1633.
Thus on his sarcophagus it is written "Gustavus Adolphus Magnus" (Gustav Adolf the Great).
He's the only Swedish monarch who has been officially awarded with such a honorific.