My recomendation will depend on : What trigger system is your friend most accustomed to ? Does your friend prefer metal frames or polymer? What type of range shooting does your friend do , defense style shooting or bench for accuracy ? Does your friend reload 9mm ?
There is a lot of personal preference in play in this decision. As a universal recomendation , go to a range that rents these two pistols, shoot both, and go from there.
Both are excellent handguns. I own both the G17 and the Sig 226 9mm. I carry the G17 daily and I use the Sig 226 for range duty and general plinking.
Glock 17 Pro's(IMO): Lower Price, lower magazine cost, tenifer , not picky with ammo, simple manual of arms, reliable, long service life, plentiful parts, ability to fully disassemble with simple tools/user maintainability,
High capacity, light weight, large aftermarket support, cheap to improve trigger, short trigger reset,
Low bore axis,
Glock 17 Con's (IMO): grip angle, polygonal rifling not lead friendly,
Mooshy trigger, not as ergonomic,
Sig 226 Pro's(IMO): Reliable , most are near match grade accurate, cut rifled barrel is lead friendly, not ammo picky, grips can be changed, stainless/alloy construction, safer to carry C&L,
Sig 226 Con's(IMO): high bore axis, more complex internally, harder to get performance parts, more expensive, mags more expensive, heavier than Glock, DA to SA transition, longer SA trigger reset (non-SRT),
I left it open because I am sure I forgot a few. I will add that the Short Reset Trigger on some of the Sig models is well worth the money. I have a Sig 220 Beavertail that is a great shooter.