In Spain you can surf all year round.
If you are a beginner, the best time to surf in San Sebastian is in summer and early autumn because the waves during this time of the year are smaller and friendlier. Besides, this is a good time for intermediates that want to brush up their skills.
On the other hand, for some intermediate and advanced surfers coming in San Sebastian, the best time to surf here is between September and April. The reason is that autumn and spring waves are bigger than in summer. Moreover, during this part of the year, the conditions here are very reliable and the beaches are less crowded too.
Winter comes with some huge swells, but the good news is that there are plenty of sheltered spots in Spain, so you may find both powerful and gentle waves to surf upon.