Rain is not uncommon at this time of the year, and days are often quite windy. You will have to allow for a range of temperature. Its very unlikely to get very cold, but it can get quite chilly at night, particularly if you go outside the center. At mid day the temperature can easily rise to short sleeve temperatures. Rain gear is recommended, as is a jacket to break the wind.
Spring is one of the most pleasant times of the year to visit Madrid.
The long days are generally warm and the nights cool. Large numbers of young people take to the streets for the all-night 'marcha' and all the outdoor cafes open up. Madrid is usually fairly quiet as the Madrid masses head to the south for the processions and the year's first sun-tan. Rain is not uncommon at this time of the year, and days are often quite windy. You will have to allow for a range of temperature.