Well, first of all, Scout is a girl. Her real name is Jean Louise. She is able to put herself in others' shoes because her father, Atticus, has raised her in an atmosphere of empathy and fairness. Atticus sees all people as individuals, often victims of their circumstances. And their circumstances have little or nothing to do with their character.
Important also to understanding Scout's empathy is Atticus' instance on fairness. For example, when Scout asks if her family is poor, Atticus responds this way:
Atticus said professional people were poor because the farmers were poor. As Maycomb County was a farm county, nickels and dimes were hard to come by for doctors and dentists and lawyers. (Chapter 2)
Through the example of her father, Scout is able to emulate values all too uncommon in society.