We use a few techniques. The first and most fool proof is to let them out to range a couple hours or so before dusk. They will generally return to the coop as it gets dark.
We also get them used to an evening snack that is only given in the run, usually fruit or scratch. Whenever any are out...