Generally I would say whenever it actually helps you and you can get away with it.

But in reality a lot of lies tend to fall on their faces, people fuck up their stories, they act differently, the lies end up not helping and there is always something you didn't see. Long term it just doesn't win you friends and reality always catches up with you, so most of the time it's a good idea to be honest in my opinion.