Though various authorities will declare that mankind, or the human spirit, is basically good the Bible says that all have sinned and fall short of the glory of God. Sin is the Biblical word for rebelling against God. The Bible teaches that God, being a perfect and righteous judge, has to punish us for our sins. So the natural state of all persons is that they are sinful/rebellious toward God and so will be punished for their sins.
The Bible acknowledges that a sinful person can do something that is good. The problem exists in that no matter what good you may do you also have done sinful things, displeasing things before God. Imagine a person who committed the murder of your child standing before a judge and the defense lawyer is bringing character witnesses forward who tell of all the good that this murderer has done. Is the judge going to say that 'since this murderer has done so many wonderfully good things we will declare him innocent?'
In the same manner God will hold each person accountable for their sins on the merit of their sins and not balance them on a scale against any good they may have done.