If I am looking for a lens for still photography , then does an STM lens have a benefit over non-STM lenses?
Canon introduced STM autofocus lenses primarily to resolve an issue that their previous Ultrasonic motors could not: smooth autofocus when shooting video.
In still photography, focus occurs before the image is shot, so that how the motor gets to focus is not as big a concern. But in video, focus (well specifically autofocus) occurs while video is being recorded, therefore, the relatively jerky focus from Ultrasonic motors was not preferred. There is more to it than that of course, but thats the short answer.
If you are not shooting video, there is no specific reason to favor STM lenses over non-STM lenses, other than most are very new.
Maybe, maybe not. It all depends on the two lenses in question.
If compared to the previous non-STM versions of the same lens series, there is often a benefit in terms of faster autofocus and sometimes improved optics or other considerations as well. Sometimes there is not any other improvement.
When compared to higher end USM lenses the question gets a bit more complicated. In general the ring USM lenses such as pretty much the entire "L" series of lenses focus faster than their STM counterparts of the same focal length or focal length range and maximum aperture. There are a few notable exceptions such as the EF 85mm f/1.2 L (original and II versions) that have such large and heavy lens elements that they are slower focusing. But there is no STM lens faster than f/4 at 85mm.
For some uses the biggest downside is that all STM lenses are focus-by-wire when manually focused. This means there is no direct link between the manual focus ring and the lens' focus mechanism. Rather, the focus ring transmits a set of electronic instructions to the camera body which in turn sends electronic instructions to the lens to move the focus elements using the same motor as when the camera is focusing the lens automatically. The smallest amount of focus movement possible is one "step" of the stepping motor in the lens. It is possible, however, to manually focus (even if in "steps" by wire) without turning off AF via the switch on the side of the lens barrel. This is known as "full time manual focus". To do this you must first half press the shutter button or press the AF-ON button to activate the camera's focusing system before you can manually focus the lens.
The great majority of USM lenses have a direct mechanical connection between the focus ring and the lens' focusing elements. Those that are ring USM allow full-time manual focus without moving the AF/MF switch. Other than the few exceptions that are focus-by-wire USM lenses (mostly older discontinued models), the ring USM lenses can manually focus without any power from the camera. Focus-by-wire lenses require that the camera be powered on and the metering be active (half-pressing the shutter button or pressing the AE-L or AF-L button will activate metering). Lenses with geared AF motors must be switched to "MF" using the AF/MF switch to be manually focused without risking damage to the AF system.
For more about why higher end lenses use USM AF rather than STM, please see: Why do higher end lenses use USM instead of STM?
For a detailed comparison of of Canon 50mm lenses with geared AF (EF 50mm f/1.8 II), micro-USM (EF 50mm f/1.4 USM), and STM (EF 50mm f/1.8 STM) AF please see this answer to: What would be a better lens, 40 or 50mm prime, for walk around?