Matthew Perry originally turned down the role of Matt Albie, but Aaron Sorkin did not want to have anyone else play the part, and apparently would not take "No" for an answer. Perry reconsidered, and decided to jump on board.
The character of Harriet Hayes is loosely modeled after creator Aaron Sorkin's former girlfriend, Kristin Chenoweth. Kristin Chenoweth, was a regular on Sorkin's show The West Wing (albeit after he left it). Like Hayes, Kristin Chenoweth is a devout Christian; also like Hayes, Chenoweth appeared on Pat Robertson's show "The 700 Club" to promote her CD and then later expressed regret for any implied endorsement of Robertson's show or his brand of Christianity.
Harriet's inability to tell a joke is based on Sarah Paulson's own inability to do so. Aaron Sorkin heard she had that problem, and thought it was hilarious, so he wrote it into the show.
The last episode of the first season of the first three of Aaron Sorkin's television shows (The West Wing (1999), Sports Night (1998), Studio 60 on the Sunset Strip (2006), as well as the series finale of The Newsroom (2012), are titled "What Kind of Day Has It Been?"
The law firm of Gage Whitney Pace, employer of Mary Tate (Kari Matchett), was also the law firm at which Sam Seaborn (Rob Lowe's character on The West Wing (1999)) worked before joining the Bartlet administration.