Use it to express a very strong or emphatic denial about something's possibility or truth. He couldn't have solved that puzzle, not by any stretch of the imagination.
Pro Tip 2/3
Idiomatic Context
Understand it's an idiom; knowing individual word meanings doesn't convey its full sense. That old car won’t win a race, not by any stretch of the imagination.
Pro Tip 3/3
Emotional Emphasis
It often conveys the speaker's strong feelings or convictions about the statement. This isn't a good decision, not by any stretch of the imagination.