Škofja Loka is close to Ljubljana and Kranj, with regular bus connections making it straightforward as a day trip. The railway station is outside the old centre on the Ljubljana-Jesenice line, so check onward buses or be ready for a longer walk.
Driving is easy, but the medieval core is compact and not a place where you want a car. Park on the edge and explore the centre on foot.