The episode is based upon Stephen King's book "Misery". In fact, the episode has a lot of similarities to the book. Such is Meredith locking Aria in her room like Annie did to Paul. Another is the basement scene when she locks Aria, Hanna, Emily in there. Annie had done this to Paul and Buster.
The title is a popular idiom that means "Unhappy people like other people to be unhappy, too," which may mean that since one of the Liars may be miserable, someone else will be miserable with them. Veronica Hastings uses this idiom early in the episode when she and Spencer are discussing why they have to attend Mr. Hastings' awards ceremony (which is a cover for the anniversary dinner Spencer has planned for Toby).
The pharmacist says that clonazepam is a a Class III medication. Benzodiazepines, including clonazepam, are actually Class IV medications.