Conveys a signal from an upstream receptor or intracellular signal transducer by catalysis of the reaction: protein serine phosphate + H2O = protein serine + phosphate, and protein threonine phosphate + H2O = protein threonine + phosphate.