If a friend needs to walk home alone and feels unsafe, there's one easy way you can substantially increase their safety. Just give them a phone call and stay on it until they arrive home. Make sure to keep the conversation going.
Your friend should also hold their phone to their face. Ear-pods are way too easy to overlook and you want the phone call to appear as obvious as possible. No person in their right mind would pick someone who's on the phone as a target.