First way is to use start-all.sh & stop-all.sh script: You can start/stop all the daemons at once
Second way is start-dfs.sh, stop-dfs.sh & start-yarn.sh, stop-yarn.sh : Here dfs daemons are started/stopped separately and yarn daemons are strated & stopped separately.
Third way is hadoop-daemon.sh start/stop namenode/datanode & yarn-deamon.sh start/stop resourcemanager/nodemanager : This command starts/stops each daemon individually. This is beneficial when you have to restart sing daemon without disturbing other daemons.