Finding new physical responses that signal topological quantum phase transitions is of both theoretical and experimental importance. Here, we demonstrate that the piezoelectric response can change discontinuously across a topological quantum phase transition in two-dimensional time-reversal invariant systems with spin-orbit coupling, thus serving as a direct probe of the transition. We study all gap closing cases for all 7 plane groups that allow non-vanishing piezoelectricity and find that any gap closing with 1 fine-tuning parameter between two gapped states changes either the $Z_2$ invariant or the locally stable valley Chern number. The jump of the piezoelectric response is found to exist for all these transitions, and we propose the HgTe/CdTe quantum well and BaMnSb$_2$ as two potential experimental platforms. Our work provides a general theoretical framework to classify topological quantum phase transitions and reveals their ubiquitous relation to the piezoelectric response.