I believe Catalonia is sympathetic to Scotland's bid for independence because it desires the same type of declaration. It is easy to identify with other countries that are in similar situations to your own country. They may have other reasons to support Scotland, but generally one could assume it has something to do with the similar situation.
Catalonia is only sympathetic to Scotland because they want to see the precedent set that areas can go independent like theirs. It is simply an alliance of convenience and it won't be something that lasts very long, probably not at least. But we will all have to wait and see what the people of Scotland decide.
Catalonia clearly has its own culture and heritage and, after all, a unified Spain didn't really come into being until relatively (on an historic scale) recently. Still, Scotland has gone through the measure - actually getting the issue on the ballot to vote on, as opposed to just having the sentiment.
With Scotland making serious moves towards independence such as independent currency, of course Catalonia wants to follow suit. By supporting Scotland's bid, and seeing them succeed, Catalonia can look to the UN and ask, "Why not us?" Catalonia unfortunately does not share the same situation as Scotland though. The entirety of Scotland does not net the same tourist income as the city of Barcelona alone. Spain will be much more reluctant to let such income just slip away without a fight.
I think that a good bit of it does have to do with the fact that Catalonia wants the same type of declaration, but one cannot ignore the very real fact that Spain and England have been scuffling on and off for centuries. I would not be surprised if part of it is also that the Spanish genuinely enjoy seeing the English potentially losing some power.