Porto's weather is moderated by its location on the Atlantic, in Portugal's Norte region, and the temperature range is similar to Lisbon. Although mild, winter months tend to be much rainier that Lisbon. Between June and September, it's pretty warm, and the chance of rain is slight.
Spring and early Fall are the best times to visit. June is optimal, but heat seakers may prefer July and August. Rains arrive about the middle of September, and get heavier through the winter. The rainy season is over in Feburary, trees bloom around Porto at that time. October is a fine time to go if you can tollerate some rain--and it's easy to duck into a wine bar to taste some of the local port wine.
If you must go in Summer, reserve your lodging in advance, as this is the major vacation time in Europe.
Porto features many summer festivals. If you like music, Verão na Casa, which features Portuguese singers, fado, sounds from Brazil, jazz, reggae and classic music. Evenings, June through early September.
The Festa de Sao Joao, St. John's Festival, is the biggest annual festival to be held in Porto, taking place on June 23rd.
The charts below show the historic high and low temperatures in Porto and the precipitation month-by-month.
City Drops Hostel (value)
Oporto Trendy Apartments (value)