Unemployment shouldn't affect a naturalisation decision - the time that that makes a difference is when you're applying for ILR.
CCJs could make a difference, I think - rightly or wrongly, the Home Office could draw the conclusion that they cast a shadow on the character of the person concerned. They don't have to prove you're of "bad" character in order to refuse your application - they have to be "satisfied" that you are of good character. If they have doubts - eg unresolve CCJs, or a pending traffic offence where conviction would make a difference, then they may not be able to be satisfied. My own inclination would be to get your finances on an even footing before applying. I'm not saying you need to pay off all your debts, but you may need to show that you're making progress in doing so.
And I think your friend's case is a perfect example. A guilty verdict in his case would have made a difference to the outcome of a naturalisation application. It is true that he is innocent until proven guilty, but the fact that the case was pending meant that HO couldn't be satisfied that he was of good character until the case was concluded, with either a guilty or not gulty verdict. And the fact that he attempted to conceal it made it worse.