There really isn't a golden rule with this, as with everything.
What I do though, is, like most others, yell/exhale at the moment of impact, or a few seconds before, because, with a confident fighter, a good yell can go a very long way.
It also helps build confidence – when I first started TKD at 17, I was pretty shy. After a few months of taking classes, my confidence was increased 10,000%. The yelling really does help.