If God wishes or permits a deceased person to reach out to us in some way, then it could happen.
However, we are not permitted to call up the dead ourselves, and that includes loved ones. We also are not permitted to go through mediums who would write some letter claiming it is from a deceased person.
Although “all things are possible with God”, it seems like a deceased person communicating by writing you a note is a bit far-fetched, unless it is a case of them writing something down while they were alive and you just happen to find it now at a crucial moment. The deceased are no longer in the physical realm, so any communications God permitted would be more like the communications that can come from Heaven via God, such as when God sends an angel or just inspires a person on earth to think something at a certain time. God and angels don’t send us physical letters.