Who gave the names to the God like Lord Siva, Lord Vishnu, etc.? Are they the writers of the Vedas?
Did they ask the god to name them like this so that people can worship them by that name or the god himself said to worship him by that name?
Shiva got most of his major names at birth, as I discuss in this answer. When Shiva was born, he immediately started to cry, and Brahma gave him numerous names to calm him down, as described in the Shatapatha Brahmana of the Yajur Veda:
[Brahma] said to him, 'My boy, why criest thou, when thou art born out of labour and trouble?' He said, 'Nay, but I am not freed from (guarded against) evil; I have no name given me: give me a name!' Hence one should give a name to the boy that is born, for thereby one frees him from evil;--even a second, even a third (name), for thereby one frees him from evil time after time.
He said to him, 'Thou art Rudra' And because he gave him that name, Agni became suchlike (or, that form), for Rudra is Agni: because he cried (rud) therefore he is Rudra. He said, 'Surely, I am mightier than that: give me yet a name!'
He said to him, 'Thou art Sarva.' And because he gave the him that name, the waters became suchlike, for Sarva is the waters, inasmuch as from the water everything (sarva) here is produced. He said, 'Surely, I am mightier than that: give me yet a name!'
He said to him, 'Thou art Pasupati.' And because he gave him that name, the plants became suchlike, for Pasupati is the plants: hence when cattle (pasu) get plants, then they play the master 3 (patîy). He said, 'Surely, I am mightier than that: give me yet a name!'
He said to him, 'Thou art Ugra.' And because he gave him that name, Vâyu (the wind) became suchlike, for Ugra is Vâyu: hence when it blows strongly, they say 'Ugra is blowing.' He said, 'Surely, I am mightier than that: give me yet a name!'
He said to him, 'Thou art Asani.' And because he gave him that name, the lightning became suchlike, for Asani is the lightning: hence they say of him whom the lightning strikes, 'Asani has smitten him.' He said, 'Surely, I am mightier than that: give me yet a name!'
He said to him, 'Thou art Bhava.' And because he gave him that name, Parganya (the rain-god) became suchlike; for Bhava is Parganya, since everything here comes (bhavati) from the rain-cloud. He said, 'Surely, I am mightier than that: give me yet a name!'.
He said to him, 'Thou art Mahân Devah (the Great God).' And because he gave him that name, the moon became suchlike, for the moon is Pragâpati, and Pragâpati is the Great God. He said, 'Surely, I am mightier than that: give me yet a name!'
He said to him, 'Thou art Îsâna (the Ruler).' And because he gave him that name, the Sun became suchlike, for Îsâna is the Sun, since the Sun rules over this All. He said, 'So great indeed I am: give me no other name after that!'
Now this doesn't mention the name Shiva, but when the same story is told in this chapter of the Srimad Bhagavatam, the name Shiva is included:
There was much anger generated in the mind of Brahmā, which he tried to control and not express. Although he tried to curb his anger, it came out from between his eyebrows, and a child mixed blue and red was immediately generated. After his birth he began to cry: O destiny maker, teacher of the universe, kindly designate my name and place. The all-powerful Brahmā, who was born from the lotus flower, pacified the boy with gentle words, accepting his request, and said: Do not cry. I shall certainly do as you desire. Thereafter Brahmā said: O chief of the demigods, you shall be called by the name Rudra by all people because you have so anxiously cried. My dear boy, I have already selected the following places for your residence: the heart, the senses, the air of life, the sky, the air, the fire, the water, the earth, the sun, the moon and austerity.... My dear boy Rudra, you have eleven other names: Manyu, Manu, Mahinasa, Mahān, Śiva, Ṛtadhvaja, Ugraretā, Bhava, Kāla, Vāmadeva and Dhṛtavrata.
Now as far as Vishnu goes, his names have been given all sorts of mystical meanings, but the meanings don't necessarily reflect the origins of the names. The name Vishnu, itself, means the one who pervades. But there are lots of gods who are omnipresent and thus pervade the universe. So why is Vishnu alone called the pervader? It's because "Vishnu" was originally a name of Vishnu's incarnation Vamana the dwarf, because he grew large enough that he pervaded the whole Universe. That is why Krishna says this in the Bhagavad Gita:
Of the Ādityas I am Viṣṇu, of lights I am the radiant sun, of the Maruts I am Marīci, and among the stars I am the moon.
It might seem strange to call Vishnu an Aditya or son of Aditi, especially since Vishnu is unborn and without beginning as I discuss in this answer. But this is actually a reference to Vamana, who happens to be the youngest son of Kashyap and Aditi. In any case, since Vamana was called Vishnu, that became a name of the god that Vamana was an incarnation of.
Similarly, Narayana means "the one who resides in the water", which is certainly an accurate description of Vishnu (except he resides in milk, not water), but it originated as the name of the sage Narayana, an incarnation of Vishnu who was the son of Yama god of death and twin brother of the sage Nara. (Nara and Narayana were the previous births of Arjuna and Krishna respectively.) So people started calling Vishnu by the name Narayana because that was the name of his famous incarnation. And sage Narayana really was a famous incarnation of Vishnu in ancient times, which is why the Mahabharata opens with "Om! Having bowed down to Narayana and Nara, the most exalted male being, and also to the goddess Saraswati, must the word Jaya be uttered."
It depends on which name you are referring. If the name you are referring are present in Samhita section of Vedas ie. In heard portions, then such names are eternal and they are authorless. They are eternal as Vedas are eternal.
For eg. If you are asking for the name Shiva and Vishnu then these names are eternal and authorless as Samhitas (heard portions) mention them:
The name "Vishnu" exists in many verses of Samhita portion of Vedas like
Rig Veda 1.22.17, R.V. 1.154.1, R.V.1.156.4 etc...
As the name "Vishnu" exists itself in Samhita so it is eternal name and authorless, if someone seems to give the same name in some place and time then it doesn't mean it originated at that time.
The name "Narayana" also exist in parts of Vedas like Taittariya Aranyaka. Although it is not heard portion but still Aranyakas are considered eternal coming from the Guru Parampara.
Taittariya Aranyaka 10.13 mentions the name Narayana as I discuss in my answer here.
As I discuss in my answer here, Shiva is the name taken from the Samhita (heard) portion of Vedas. Other names from Taittariya and Vajasena Samhita of Yajurveda are:
Rudra, Shiva, Shankara, Nilagriva, Pasupati, Ishana, Trayambaka, etc...
The above names are heard in meditation and written as Samhitas. So, these are eternal names and authorless as Vedas are.
But the names like Bholenath which is not present in Samhitas are given by Gods, Devotees, etc...
When Lord Shiva manifests as Rudra from Brahmas forehead then Brahma gives name to Lord Rudra. They are 11 in number. As per Mahabharat their names are:
Mrigavyadha, Sarpa, Nriti, Ajaikapat, Ahirudhana, Pinaki, Dahana, Ishwara, Kapali, Sthanu, Bharga
Now we can see some names of these Rudras coincide with the names of Lord Shiva. For eg. Pinaki, Ishwara, Kapali and Sthanu are also the names of Lord Shiva. So, this is just coincidence that name matches because apperance and some attributes of Lord Shiva and Rudras are somewhat same.
Lord Shiva isn't among the 11 Rudras as I discuss in my answer here.
Similar is the case of Srimad Bhagvatam in 3.12.12,13 section: First of all the Sanskrit text mentions the name as "महाञ्छिव" (Mahanxiva) and it has been interpreted as Mahan and Shiva. Even if it means 'Shiva' then it is just the name of one Rudra.
Lord Brahmā said: "My dear boy Rudra, you have eleven other names: Manyu, Manu, Mahinasa, Mahān, Śiva, Ṛtadhvaja, Ugraretā, Bhava, Kāla, Vāmadeva and Dhṛtavrata. O Rudra, you also have eleven wives, called the Rudrāṇīs, and they are as follows: Dhī, Dhṛti, Rasalā, Umā, Niyut, Sarpi, Ilā, Ambikā, Irāvatī, Svadhā and Dīkṣā." [S.B. 3.12.12,13]
As we can see from above the fifth Rudra is named as Shiva and his wife (ie. Fifth Rudrani) is Niyut. So, it isn't referring to Lord Shiva. So, also the names like Uma, Ambika which are appearing above and are Rudranis and associated with other Rudras.
So, by the same logic if the name are present in Vedas then it is eternal. If the names are present on Samhita (heard portions) then they are not only eternal but also authorless.
If someone appears to give the Same name then this doesn't mean that name originated from that time.
This is an excerpt from one of the posts on internet from very valid sources. It also eloborates Why the name nArAyaNa is the essence all other names and is applicable only to Vishnu, though, this is not exactly what the question asks?.
The name “nArAyaNa” has several meanings –
“One in whom all things inhere”
“One who is the resorted to by all”
“One whose abode is in the waters”, etc.
Because of the “NakAra”, ALL these meanings denote the person commonly known by this name, which is of course, shrI vishNu.
The proper noun makes the meanings of the word nArAyaNa denote only the person who is commonly referred to by the name.
And the only one who is commonly referred to by the yaugika and rUDhi usage of the name is shrI mahA-vishNu.
Some ignorant of Sanskrit grammar and vaiShNava traditions mistakenly think we use only the meaning “He who lies in the waters” to identify vishNu with nArAyaNa. This is absolutely wrong. Due to paninian grammar, even the yaugika artha of “He in whom all things inhere” denote only mahA vishNu and not any other deity.
Thus, nArAyaNa is a proper noun because:
Panini says so.
All ancient vedAntins have accepted this. shrI yAmunAchArya explicitly states in stotra ratna – “what vaidika would deny nArAyaNa is the parabrahman?” showing that no vaidika – advaitin, vishishtadvaitin or dvaitin – ever contested this during his time.
The context of the name in the veda itself indicates this.
This nArAyaNa is viShNu and all meanings of the name denote only lakshmIpathi viShNu and no other deity because:
Other deities have been declared as distinct from nArAyaNa.
Only viShNu is identified with nArAyaNa along with distinctive characteristics. This is proven both by using the “Na-kAra” rule (“pUrvapadAt saMj~nAyAm agaH”, aShTAdhyAyi of Panini; 8.4.3) and even without using it.
It also rules out bizarre claims that nArAyaNa is nirguNa brahman, etc. Adi Shankara himself has only used the “nArAyaNa” with the “Na-kAra” showing that it denotes a specific entity, ie, saguNa brahman. Besides the fact that nirguNa brahman is devoid of names, the “Na-kAra” makes it impossible to attribute this to any entity besides lakShmIpati viShNu. And as seen earlier, even without “Na-kAra”, it denotes saguNa brahman, ie, viShNu.
Other names are all common nouns including Indra, Chandra, Bramha, Siva, Sada-Siva, rudra, Ganesha etc
nArAyaNa cannot be applied to common nouns but all common nouns are applied to nArAyaNa due to panini Sanskrit grammar rules.
Most of the names of the administrative devatas are titles. Like Brahma, Indra, Manu etc. are not specific individuals in every creation but they are posts that can be occupied by any jivas in different periods. When there is no suitable Jiva a Vishnutattva incarnation occupies the position. Below is some reference from the commentary of Srila Prabhupada:
SB 1.3.12 Purport: The administrative posts occupied by the demigods for maintaining the regulations of the material world are offered to the highly elevated pious living beings. When there is a scarcity of such pious living beings, the Lord incarnates Himself as Brahma, Prajapati, Indra, etc., and takes up the charge. During the period of Svayambhuva Manu (the present period is of Vaivasvata Manu) there was no suitable living being who could occupy the post of Indra, the King of the Indraloka (heaven) planet. The Lord Himself at that time became Indra. Assisted by His own sons like Yama and other demigods, Lord Yajña ruled the administration of the universal affairs.
Names of Vishnu-tattva like Vishnu, Krishna and His special manifestation Sada-Siva are eternal and Their names are as eternal as the Lord Himself, so the idea of who gave Him the names would be out of question since He is the source of everything else. However those name will have specific meaning that explains His features. Like Krishna means all attractive, Vishnu all pervading etc. Also we do see that when the Supreme Lord and His incarnations appear on the planet Their devotees give them names (which supposedly existed even before): Srimad Bhagavatam 10.8.12:
SB 10.8.11 — Sukadeva Gosvami continued: Having thus been especially requested by Nanda Maharaja to do that which he already desired to do, Garga Muni performed the name-giving ceremony for Krsna and Balarama in a solitary place.
SB 10.8.12 — Garga Muni said: This child, the son of Rohini, will give all happiness to His relatives and friends by His transcendental qualities. Therefore He will be known as Rama. And because He will manifest extraordinary bodily strength, He will also be known as Bala. Moreover, because He unites two families — Vasudeva’s family and the family of Nanda Maharaja — He will be known as Sankarsana.
SB 10.8.13 — Your son Krsna appears as an incarnation in every millennium. In the past, He assumed three different colors — white, red and yellow — and now He has appeared in a blackish color. [In another Dvapara-yuga, He appeared (as Lord Ramacandra) in the color of suka, a parrot. All such incarnations have now assembled in Krsna.]
Similarly we see about Lord Siva in Srimad Bhagavatam third canto. After Brahma creates four Kumaras and they refuse to generate further population he becomes angry and Rudra comes out of him. Relevant information:
SB 3.12.7 — Although he tried to curb his anger, it came out from between his eyebrows, and a child mixed blue and red was immediately generated.
SB 3.12.8 — After his birth he began to cry: O destiny maker, teacher of the universe, kindly designate my name and place.
SB 3.12.9 — The all-powerful Brahma, who was born from the lotus flower, pacified the boy with gentle words, accepting his request, and said: Do not cry. I shall certainly do as you desire.
SB 3.12.10 — Thereafter Brahma said: O chief of the demigods, you shall be called by the name Rudra by all people because you have so anxiously cried.
SB 3.12.11 — My dear boy, I have already selected the following places for your residence: the heart, the senses, the air of life, the sky, the air, the fire, the water, the earth, the sun, the moon and austerity.
SB 3.12.12 — Lord Brahma said: My dear boy Rudra, you have eleven other names: Manyu, Manu, Mahinasa, Mahan, Siva, Rtadhvaja, Ugrareta, Bhava, Kala, Vamadeva and Dhrtavrata.
Note: Citations are from Bhaktivedanta Swami Srila Prabhupada's Srimad-Bhagavatam.