This quote appears in chapter 20, when Atticus points out to the jury, as well as to the people witnessing this racially charged trial, that the society that is prosecuting Tom Robinson already has a habit of correlating evil to darkness. Moreover, they connect the darkness to the color of the skin of all black people.
(Bob's accusation) is in itself a lie as black as Tom Robinson's skin, .... You know the truth, and the truth is this: some Negroes lie, some Negroes are immoral, some Negro men are not to be trusted ....
When Atticus makes the statement of the lie "as black as Tom Robinson's skin" he uses figurative language to create awareness of the bias that prevails in the courtroom and in society. However, using this type of comparison, he also attempts to dissociate that racial/evil connection by pointing out that
But this is a truth that applies to the human race and to no particular race of men. There is not a person in this courtroom who has never told a lie, who has never done an immoral thing, and there is no man living who has never looked upon a woman without desire.
It is debatable whether the characterization of the lie as "black" is effective in dissuading the jury from finding Robinson guilty. It is also debatable to what extent Atticus's own potential bias, which is a symptom of the times, comes out with this simile.
This quote is from Atticus's closing statement at Tom Robinson's rape trial. Atticus is referring to the idea that all black people lie. This is part of the prejudicial attitude that the people of Maycomb have. Atticus is trying to get them to realize that this is not true. All black men do not lie.
The witnesses for the state [were] confident that you gentlemen would go along with them on the assumption—the evil assumption—that all Negroes lie, that all Negroes are basically immoral beings, that all Negro men are not to be trusted around our women, an assumption one associates with minds of their caliber. (ch 20)
Atticus goes on to say that black men are just like white men. There are some good, and some bad. It is a lie to suggest that all black men are bad, or that all white men are good. He wants the jury to see Tom Robinson for more than his skin color, and realize that he is innocent and acquit him. Unfortunately, they convict him.