When to go to Spain:
Spain can be enjoyable any time of year. The ideal months to visit are May, June and September (plus April and October in the south). At these times you can rely on good-to-excellent weather, yet avoid the extreme heat - and the main crush of Spanish and foreign tourists - of July and August.
When to go to Portugal:
Portugal’s high season is mid-June to mid-September. The Algarve has almost year-round sunshine spring and autumn are good for lush foliage. It gets hot everywhere in July and August, but particularly in the Algarve and Alentejo - where it climbs over 45 degrees in some places - and the upper Douro valley.