Principally, Barcelona gets very hot and humid summers, July and August being the hottest months. Barcelona’s winters are mild and dry, the average winter temperatures being 9º – 10ºC in January and February. The “rainy season” in Barcelona is in the period from September to October and rains are occasional for the rest of the year.
It’s good to wear lightweight clothing, t-shirts, sleeve-less shirts, skirts and (high-waisted) shorts as well as swimsuits (the water is usually warm enough to swim in late spring and fall as well) in warm spring, summer and autumn months.
Some light but warmer clothes (like a cotton sweater, a light jacket or a warm coat) are highly recommended for cooler evenings and nights especially from September till late October.
Sandals and comfortable walking shoes are the best gear by far for walking around Barcelona. High heels are not suitable unless for going out at at an elegant restaurant, opera, etc.
From November through February some warm gear (like a fleece pullover, warmer coat and winter boots) are highly recommended.