Witches refer to hour of midnight being the witching hour only when it is on the night of a full moon. It is considered to be a time of transformation and change, with the witches ability to cast a spell considered to be at its height.
The idea that the moon affects whatever witchy thing is being done comes from ancient times when Goddesses associatted with fertility, witchcraft and the moon were worshipped.The notion was that as the moon waned and waxed its powers (and that of the deities) did, culminating at the full moon. Over time, this has changed to the thought that a witches power is affected.
Amateur spell books (the kind that claim you can turn your ex-boyfriend into a toad, or make yourself instantly attractive to the opposite sex) recognise the link between the witching hour and the publics idea of what a spell is, and often include the note 'For best results, perform spell at witching hour, preferably skyclad'. For best results, go outside at the witching hour and torch the book.