I’ve never had any trouble walking to and from the Vatican from central historic Rome, including with female friends. It’s a nice walk. It depends on the person, their age, and if they are wearing appropriate shoes. It’s only a flat one mile walk, and you can make it even prettier by doing some of the walk along the Tiber, then crossing the Tiber back over San Angelo, after resting and having a coffee or a wine in Vatican City.
If you’re not up to walking a mile to the Vatican, just be aware that by far, the bus to the Vatican from historic Rome Center is the most likely place for a person to get pickpocketed in Rome.
Its packed with distracted, star-gazing tourists mesmerized at going to the Vatican. Pickpocketing 100% preventable, so just beware.