Only for installations that are connected to the grid, which pays taxes (the so called "sun tax"). AFAIK installations not connected to the grid are legal and don't have to pay taxes.
The difference seems to be that in Florida you can't live in a house that is not connected to the grid.
I'm looking over my balcony in Spain and can see quite a few solar panels! Maybe they are for hot water heaters or something then.
Why is it forbidden in Spain?
Knowing nothing about the situation in Spain I'm going to guess because power plants see it as a threat to their business.
It's not forbidden, but you have to pay extra taxes and there's way more limitations.