There are quite a few ways to do this, for example there are services that will automatically send emails on a certain day. You could use this to send an email containing details to recover your wallet.
You can also create time-locked Bitcoin wallets, which could also be used to lock out funds until your death.