Morality plays were popular during the 15th and 16th-centuries. Historically they sought to teach the audience lessons that focused on the seven deadly sins: lust, gluttony, greed, sloth, wrath, envy and pride. Whilst characters who committed these sins were punished, morality plays showed that if a character repented then they could redeem themselves.
An Inspector Calls is a morality play because all of the Birlings and Gerald Croft commit crimes which are similar to the seven deadly sins. Mr Birling is greedy because he wants more money, Sheila is guilty of wrath and envy when she spitefully complains about Eva Smith and so on. Not all of the characters manage to redeem themselves.
What is the effect of this?
Priestley uses the morality play structure to teach a 20th-century audience a series of lessons that relate to his beliefs about social responsibility, age, gender and class. The audience is invited to enjoy judging these characters - they are also forced to question their own behaviour. Priestley would have hoped that people watching the play would have left the theatre as better people.