Why YSK: People seem to, on average, think that a car takes a lot of fuel to start up. In reality, it takes on the order of a few millilitres of fuel to start an engine. That means if your car isn’t equipped with an automatic start/stop system to stop your engine instead of idling, it saves fuel to turn off your engine and start it back up when you need it.
Caveat: air conditioning and radio might not work with the engine turned off.
Scenarios where this might be useful include waiting for trains to pass at rail crossings, waiting for food at drive-throughs, dropping off or picking people up on the side of the road when they need to load stuff, etc. May not be a good idea to use this while waiting at a red light because starting the engine does take time which would annoy drivers behind you when the light turns green.
Some cars are equipped with systems that will automatically stop the engine when you are idling for a while (e.g. waiting for a red light). If yours is, then manually turning off your engine will probably result in reduced fuel savings compared to just relying on the car to do it for you.
I don’t think that stopping and starting the engine a lot is a good idea, even if it is not unhealthy to the engine. In the situations you had as examples, it is just inconvenient to turn off the engine and have to start it up again.