We had wonderful experiences with the hostels in Spain last summer. My husband stayed in the US so it was just me with two kids for 6 weeks. We never felt threatened, and we met some wonderful families as a result of these stays. Hotels are less personal and have frequent turnover with their employees. The hostels are usually family businesses, operated by family members.
Check the other safety suggestions on this sight!! They are extremely helpful!!
I have a funny story to share. We met a young couple on the ferry between El Puerto and Cadiz. The gal was wearing a huge engagement diamond and very fancy jewelry. They were staying in a fancy hotel in Sevilla, and the night before someone had stolen her clothing. They had left all her jewerly and one of each type outfit. She had several bags of clothing and they had just simplified her travel by removing the excess. The considerate thief had even left her two swimsuits!!