Sometimes coaches instruct players to fair catch. Much more often, they coach them on what to look for in making their own judgment call based on what they're seeing on the field.
Players fair catch if the opposing punt coverage is really good, and an attempted return is likely to get them tackled, usually very hard, very quickly (which could create a turnover) OR if they perceive that (remember-- they're trying to gauge two things at once).
Some players are better than others at judging the coverage while watching the ball, and make better decisions. Lesser returners err on the side of the fair catch, because an attempted return that's met immediately with a bone crushing hit carries a high risk of injury and turnover.
Players typically will let a ball go past them based on field position, playing the odds that it's going to be a touchback. If you fair catch a ball at the 8, that's where you start. If you let it hit at the 8, the most likely outcome is that it rolls into the end zone or it's a touchback and you start at the 25. If the punter or coverage is really good and the ball checks up and gets downs inside the 5, then that sucks but it's part of the game. The opposition is trying to win too, after all. If your returner is highly aware and sees the gunners will be in position, they may try a fair catch rather than risk the ball being downed super deep in their own end.
The other reason not to return is if the punt just isn't returnable. If you're set up deep to the field side and the ball goes relatively shallow to the boundary, then you may just not get there.