We show that the photoluminescence intensity of GaN and InGaN nanowires in electrolytes sensitively responds to variations of the pH value and the applied bias. The realization of an electrochemical working point allows pH detection with a resolution better than 0.05 pH. The observed effects are attributed to bias-dependent nonradiative recombination processes competing with interband transitions. The results show that group III鈥搉itride nanowires are excellently suited as nanophotonic pH sensor elements.