Definitely beware of pickpockets on public transportation. I've found that the best way to be safe is just to be aware.
They target tourists in groups who are distracted talking to each other. One time in Madrid, I saw a couple with jackets draped over their arms walk right up to a group of German tourists and just brazenly start digging around in one guy's pockets. Of course, we pointed out what was happening and the pickpockets ran off at the next stop.
If you know what to watch for and you pay attention, it's not that hard to keep yourself safe and you won't have any problems.
That said, absolutely use public transportation in the major cities. They are extremely well connected.