Your songwriting copyright will transfer after your death, but who they transfer to is a decision you should make while you are still alive. It comes down to your will and how you plan for your inevitable demise.
Songwriters with no plan will see their rights and royalties go to their closest inheritors while those who have planned will see them go to the survivors who they believe should enjoy the fruits of their labors.
Know what you own
The first piece of advice is to estimate the value of your music copyrights. Your business manager or an appraiser can help you not only by estimating their current value but also their value on the open market, as well as factoring in potential gift or estate taxes.
There are special rules for songs copyrighted before 1978 but for those written after 1978, the copyright lasts for the life of the author plus 70 years. Songwriters or their estates can also recapture copyrights 35 years after they transferred or licensed them (if that occurred after 1978).
Be careful. Copyrights, the rules surrounding copyrights and the contracts surrounding the rules that surround the copyrights are notoriously complicated. Good legal advice is advised.
Make a will
If you don't have a will when you die, your property goes to your spouse or next of kin while insurance policies go to the named beneficiaries.
For everything else, the state names an executor who then tallies up all your assets and your debts, sells assets to pay debts and then determines who gets what's left depending on inheritance laws.
That situation might not be palatable to you. Have you had more than one spouse? Do you have children from more than one partner? Are your children mature enough to handle any new revenue that may come their way from your royalties?
A properly drawn will can go a long way to alleviating these issues. With a will, those assets that you value most will go to the people you value most, and hopefully allow them to remember you with peace and dignity.