In Porto, a city located in the northern part of the coast of Portugal, the climate is temperate oceanic, with mild, rainy winters and pleasantly warm, sunny summers.
The wind blows frequently: in the cold half-year, it is caused by Atlantic depressions, and can be strong, while in summer, a cool breeze from the sea blows in the afternoon.
Here are the average temperatures.
Porto - Average temperatures
Min (°C)567911141615141287
Max (°C)141517181923252524201714
Min (°F)414345485257615957544645
Max (°F)575963646673777775686357

Rainfall is quite abundant, in fact, it amounts to 1,150 millimeters (45 inches) per year. The wettest period is from November to March, while from June to September, it rains quite rarely, especially in July and August. Here is the average precipitation.
Porto - Average precipitation

Winter, from December to February, is mild: daytime temperatures hover around 13/14 °C (55/57 °F). The rains occur in periods of bad weather, which last a few days, and may be abundant. Compared to Lisbon, cold days, with lows around freezing, are more likely here, while snow is hardly ever seen. In January 1985, the temperature dropped to -2 °C (28 °F).

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

Summer, from June to mid-September, is mild or pleasantly warm depending on period. In fact, there are quite cool periods, with highs around 20/23 °C (68/73 °F), and sometimes even lower in June, and warmer periods, with temperatures hovering between 26 °C and 30 °C (79 and 86 °F). Heat waves are rarer than in central and southern Portugal; however, the temperature can sometimes reach 38/39 °C (100/102 °F) for a couple of days, as happened in both June and August 2003, or in July 2013. In summer, the weather is usually good, but some Atlantic 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 becomes gradually wetter over the weeks, although good weather often continues until mid-October.

Porto, Ribeira

The amount of sunshine in Porto is very good in summer, when sunny days prevail (though a little less than in central and southern Portugal); it is also good in spring and early autumn, while from November to March, Atlantic depressions able to bring wind and rain are frequent, although there are also sunny days. Here are the average sunshine hours per day.
Porto - Sunshine

The ocean near Porto is cold to swim in: the water temperature reaches 18 °C (64 °F) in July and September, and 19 °C (66 °F) in August. Here are the average sea temperatures.
Porto - Sea temperature
Temp (°C)141414141517181918171615
Temp (°F)575757575963646664636159

Best Time

The best time to visit Porto runs from June to September, since it is the warmest and the least rainy period 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, in September too, the rains are still quite rare. In May, you can go, but cool and rainy days are more frequent.
Even in summer, it's better to bring a sweatshirt, and maybe a light jacket for the evening.