If you are coming from Barcelona airport, navigator will offer you several options on how to come to Margalef.
We would recommend you this one, which is free of charge, road is better and has less curves.
Follow the link in Google maps to see the route.
It is not so easy to come to Margalef by public transport, but if you do so here is some useful information:
You can come to Margalef by bus from Reus and from Falset (schedule can change!):
Reus 18:05 – Margalef 20:10
Margalef (Pont vell) 05:50 – Reus 08:10
Falset 17:00 – Margalef 18:10
Margalef 08:00 – Falset 09:00