Only 26km northwest of Ljubljana and well-connected by public transport, Škofja Loka is probably just about the easiest place to visit if you're already in the capital. Buses depart from the main station in Ljubljana over 30 times per day (but only 12 at the weekends) between 5:20 and 23:00 and will drop you just outside the old town in Škofja Loka. A one-way ticket is €3.10, and can be purchased from the driver.
Trains are almost as frequent (19 on weekdays and 9 at weekends), cheaper (a weekend return is as little as €2.46) and faster (between 15-24mins compared with 37mins for the bus), but unfortunately the train station in Škofja Loka is some 3km east of the old town gates, adding a 30min walk to your journey. If you come by car there is a large car park just north of the old town, but even this has a tendency to fill up with workers on weekdays.