I am looking for the criteria which decide whether we could use the built-in feature of Google cloud i.e Stack driver or we need to go for third-party tools like Grafana, Datadog etc in order to carry out Monitoring and logging.
Based on the doc you can decide which one is good for your use case. Stackdriver is detailed as "Monitoring, logging, and diagnostics for applications on Google Cloud Platform and AWS". Google Stackdriver provides powerful monitoring, logging, and diagnostics. It equips you with insight into the health, performance, and availability of cloud-powered applications, enabling you to find and fix issues faster.
Grafana can be classified as a tool in the "Monitoring Tools" category, while Stackdriver is grouped under "Cloud Monitoring".