Yes, keywords in URLs or file names are a ranking factor, according to official Google statements. Generally, this is a positive ranking signal but it can become negative, if overdone.
Q: “It seems that having relevant keywords and URLs is very helpful.”
A: “Agreed” source
Keep in mind that this just a minor factor, so don’t over optimize.
Keywords in URLs are overrated for Google SEO. Make URLs for users. Also, on mobile you usually don't even see them.
— 🍌 John 🍌 (@JohnMu) March 8, 2017