By airplane – you can fly to Bari palese (the nearest airport) or to Napoli (Naples) or Brindisi.
From Bari airport to Matera there is a shuttle bus quite fast (1 hour, more than 60 km).
From Naples (near railway station) there are different line bus (marinobus, flixbus, miccolis) to Matera. It need 4 or 5 hours. you don’t come in the center of the town but in the hinterland (40 min by feet to the center)
From Brindisi there are trains to Bari, then you must travel by FAL trains until to Matera. It’s not very easy but it’s possible!
By trains – You can come until to Bari, then you must change train company (FAL- Ferrovie appulo lucane) and railway station (in the same square are different stations and companies). Bari-Matera is by FAL- Here the timetable
On sunday there aren’t trains, only some bus.
By bus – There are some line bus company like Marino, Liscio, Marozzi, to Matera from many towns of the north Italy.