Map from Google - Porto

In Porto, a city located in the northern part of the coast of Portugal, the climate is temperate oceanic, with mild and rainy winters, and pleasantly warm and sunny summers.
Here are the average temperatures.
Average temperatures - Porto
Min (°F)414146485255595957524641
Max (°F)555761646873777775706357

The rains are quite abundant, given that they amount to 45 inches per year; the wettest period is from November to March. From June to September it rains quite rarely, especially in July and August. Here is the average precipitation.
Average precipitation - Porto
Prec. (in)

The wind blows frequently: in the cold half-year it's related to Atlantic depressions, and can be strong, while in summer a cool breeze from the sea blows in the afternoon.

Winter, from December to February, is mild: daytime temperatures hover around 48/49 °F. The rains occur in periods of bad weather that last a few days, and may be abundant. Compared to Lisbon, here cold days are more frequent, with lows around freezing (in January 1985 the temperature dropped 28 °F), while snow is rarely seen.

Spring, from March to May, is cool, with episodes of bad weather and wind still quite frequent, but also sunny periods, with mild temperatures. In May, the maximum temperature is on average about 68 °F.

Summer, from June to mid-September, is mild or pleasantly warm depending on period. In fact, there are quite cool periods, with maximum temperatures around 68/73 °F, and sometimes even less in June, and warmer periods, in which the temperature hovers between 80 °F and 85 °F. Heat waves are rare: sometimes the temperature can reach 100/102 °F for a couple of days, as happened in June and August 2003 or in July 2013: therefore, this happens less often than in central and southern Portugal. In summer the weather is usually good, but some weather fronts bringing clouds and rain can not be excluded, especially in June, which to tell the truth often resembles a spring month.

Autumn, from mid-September to November, is mild, and over the weeks becomes gradually wetter, although good weather often continues until mid-October.

The amount of sunshine in Porto is very good in summer, when sunny days prevail; even in spring and early autumn it's good, while from November to March, Atlantic depressions able to bring wind and rain are frequent, although there are also sunny days.

Porto, Ribeira

For swimming, the ocean is cold: the temperature touches 64 °F in July and September, and 66 °F in August. Here are the average sea temperatures.
Sea temperature - Porto
Sea (°F)575757575963646664636159

When to go

The best time to visit Porto runs from June to September, being the warmest and least rainy of the year. July and August are the warmest months, but the heat is rarely excessive, and in addition they are the least rainy; however, even in September the rains are still quite rare. In May, you can go, but cool and rainy days are more frequent.
Even in the summer it's better to bring a sweatshirt, and maybe a light jacket, for the evening.