The sentence "When it is raining, peacocks dance" is a conditional of the form "if it is raining, then peacocks dance." Let R stand for "it is raining" and D stand for "peacocks dance," so the statement is R implies D. Only the logically equivalent form of this statement, its contrapositive, is guaranteed to be true.
Since only the contrapositive is logically forced by the given sentence, option (C) is the answer.