Possibly they are attracted to something in the soil and are just hanging out on the leaves. Those types of flies don't have biting or piercing mouthparts and cannot damage your plants, except by acting as vectors for disease, which is not a particular worrisome problem if your plants are otherwise very healthy.
I'm sticking this in 'plant problems'.