I answered this question a while ago here. The short version is that there doesn't seem to have been any moral problem with naming a child directly after a deity, but it was extremely rare. However, names which included/adapted the name of a deity were some of the most common in the Ancient Greek world.
I will only answer about Rome, cause it is the society i know the most, and the part about greece already has an answer.
The naming system in Rome was different from our. They had "praenomen" "cognomen" "nomen".
Praenomen is equivalent to first name, only 40 praenomen existed, 20 were given frequently the others were very rare. A lot of those praenomen were just numeral "secundus, Tertius, Quartus" etc... praenomen weren't a big deal in roman society.
Nomen served to identify the "Gens" extended family (clan) of the person.
Cognomen is the most interesting. It is a surname, it is what permitted to really identify someone in a "gens". And generally we don't know romans by their praenomen but by their surname their cognomen. A roman could have had several cognomen. Sometimes cognomen became a family name, to distinguish families inside a same gens, when the gens was very large. So romans could have a personnal cognomen+ a family one. Here some exemples:
Lucius (praenomen) Cornelius (nomen) Scipio (family cognomen) Asiaticus (personal cognomen)
Marcus (praenomen) Tullius (nomen) Cicero (cognomen)
Caius (praenomen) Iulius (nomen) Caesar (cognomen).
As you can see this system of naming leave very little room to fantasy, it was pretty strict. They never thought about changing it, because it was convenient for them. From what i know, in classical roman society, they never had given a god name to a kid