Criteria for nonclassicality in the prepare-and-measure scenario