I´m with John. In general Spanish cities are very safe for women, although in the bigger ones it´s best to ask which areas are better to stay out of such as Madrid and Barcelona. I once lived in the "Red Light District" of Granada (no comments please!) and I had to come home from my teaching job quite late. I made a point of keeping both my head up and my wits about me and I never had a single problem, though I was told by the "pros" that they kept an eye out for me!
Spain is not like the US or even parts of the UK. The life is on the streets late at night and for that reason perhaps, you should be too.
No worries.