If you want someone else to have access to your digital accounts after you pass away, then you will need to go through specific processes for each account that you have.
Many state legislatures are attempting to streamline the law concerning access to digital accounts after the owner passes away. Some have managed to pass laws granting access to an estate executor, but most have not passed anything yet.
If you live in a state that has not passed a general law, then you will need to follow the process outlined by the tech companies for each account you have.
CNET recently made that easier by detailing the steps to take for some common services in "How to prepare for your digital afterlife."
Some services mentioned are:
Google – You can take advantage of Google's inactive account service. This will inform people you choose that your account has not been active for a while and they will be given access to the account for three months.
Microsoft – Your relatives will have to follow a next of kin process. After completing that, account data will be provided on a DVD.
Yahoo and Twitter – These companies have no set process, so you will have to provide someone with your login information if you want them to have access to the accounts after you pass away.
Facebook – You can designate a legacy contact with access to your account.
If it sounds like a lot of work to have all of your digital accounts taken care of after you pass away, you might consider using a password manager to store your passwords and allowing someone to have access to it after you pass away.
You might also consider contacting your state legislators and asking them to get to work on the issue.
Reference: CNET (March 2, 2016) "How to prepare for your digital afterlife."