A songwriter, much like any other literary composer, is automatically granted rights to a song the instant it is created.
Even though the original songwriter may own the intellectual rights to a song, he or she may not be in a position to control all of the possible uses of that song. Songwriters and musicians under contract to a studio may have to relinquish certain rights to a song as part of their agreement. In that case, the studio itself may assume certain rights to a song, particularly when it comes to derivative works such as sampling, covers by other artists and compilation albums. Songs created by artists while under contract to a studio may be considered "work product," in the same sense that an engineer working for NASA or General Electric could not claim a patent for an invention created on company time.
There is also a separation between the performance rights to a song and the recording rights to a song. Many times the publisher of a song, which may or may not be the composer, controls the mechanical rights of that song. Producers and musicians interested in recording that song and releasing it on an album must obtain the mechanical rights to do so. In some ways, whoever holds the mechanical rights to a song effectively controls the future of that song. Quite often, this is the original songwriter working as the head of his or her own music publishing company.
So it seems that the songwriter is the one who has the rights to a song first and foremost. I don't know if this answered your question
Morally speaking, they definitely should have rights to their music... if they had input. If they do nothing with the song and have teams write and produce for them, they should have less rights because all they did was sing the song. However, even then it still has a form of input from them so they should have limited rights.