The actress will star in the show's Halloween special this weekend.
"We thought of the character and what we needed her to do," Shearsmith said. "When we wrote this character we thought Imelda would be perfect for this.
"It's worked out really well. She was delighted to do it and she's great - such a strong performer and totally fits into the world of Psychoville."
Meanwhile, Pemberton revealed that Staunton will return for the show's second series.
"What happens at the end of [the] Halloween [episode], where you first see her, that is leading into series two," he said. "Her character will come into series two a lot more and we'll find out more about her. We wanted to give a little hint that this wasn't the end - it's going to go on and there are more mysteries to unearth."
The Psychoville Halloween special airs on Sunday at 10pm on BBC Two.