Last summer I spent 2 weeks (early Aug) between San Sebastian, Barcelona, and Ibiza (San Antoni). Here are my thoughts:
1) I found San Sebastian to be like Disney Land. A lot of families, and a wealthy ring to it. The beach was nice, as you can see from the photo posted earlier, but the novelty quickly wore off. Partying was ok, if you like small clubs where you can't move and which are packed with Brits who chain smoke. Getting a bus out of this town was difficult, the schedule isn't frequent, so I would plan ahead. During my trip I enjoyed this leg the least. Good tapas though.
2) I enjoyed Barcelona the most, it is a fantastic city. I should mention I did not spend much time seeing tourist sights, my days consisted of beach, walking the city/groceries, dinner & drinks, party; rinse and repeat. Stayed in both a hostel and an apartment; hostel is great if you need an easy avenue to meet people, we also rented an apartment 4 minutes from Las Ramblas and it was amazing. Cooking fresh food everyday was fun, and the rooftop terrace was spectacular. Cost was 400 euros for the week, 2 double beds. I highly recommend making a day trip to Sitges, its about 30 min south on the train and a return ticket is...11 euros? Being from Ontario, Canada where liquor isn't the cheapest I thoroughly enjoyed buying what would be considered here expensive wine for cheap - find a good liquor store right away.
3) Ibiza had all the douches people here referred to but it was still cool to see. You made the point that you are young, and this is key - I'm glad I did it when I did, because I would have trouble keeping up when I'm older. What a poster said about the costs of clubbing is true - expect 60+ euros cover and 12 euro+ drinks. You can have a great time in Ibiza without blowing all your money at the clubs though; many of the smaller clubs/bars in the towns are not nearly as expensive; sunset at Cafe del Mar is a must; and though I was unable to get there, I hear Formentera has some of the nicest beaches on the Med. Its a day trip, and it is a regret I did not go. I think staying in Plaja del Bossa is a better option, and you can rent a scooter/car to tour the island - there are many fantastic hidden beaches to be found. But beware - the stereotypes about Brit tourists being the worst are true. I didn't feel unsafe in Ibiza but was more mindful than usual. Drunk Brits are aggressive and like to fight.
All in all Spain was great, I found the locals to be friendly and make an effort to play along with my poor Spanish, the food excellent, always felt safe, and would go back in a heartbeat.
Hope this helps, have a great trip.