Now is not really the time to come to Spain if you are looking to top up your tan (though it might be possible on the south coast). Expect rain and overcast days wherever you are in the country (but not all the time).
Remember that we're talking averages here. Weather throughout the world is unpredictable, so don't take what you read on this page as gospel.
If you're at the early stage of planning your trip, check out these pages:
Weather in Madrid in JanuaryI found the two Januaries I spent in Madrid to be very unpredictable (regarding the weather, at least). I arrived in the city in January to the most bitterly cold wind I have ever suffered, but a year later the restaurants put out the tables and chairs (albeit briefly) as it was so mild.
On the whole, though, you can expect it to be cold in Madrid in January (it's the coldest month of the year in the city). It should be generally dry, but pack an umbrella just in case.
The average maximum temperature in Madrid in January is 52°F/11°C and the average minimum temperature is 32°F/0°C.
Read more about Madrid
Weather in Barcelona in JanuaryBarcelona has a beach but don't expect anyone to be on it in January. It'll be pretty cold for the whole of January, though it should stay fairly dry.
The average maximum temperature in Barcelona in January is 55°F/13°C and the average minimum temperature is 39°F/4°C.
Read more about Barcelona
Weather in Andalusia in January
Spain's coldest month chills even its warmest region. Rogue warm days are certainly possible, but don't expected to return home with a tan.
The average maximum temperature in Malaga in January is 61°F/16°C and the average minimum temperature is 45°F/7°C.
Read more about Andalusia
Weather in Northern Spain in JanuaryThe north of Spain tends to be cold and wet in winter and January is just about the coldest and most wet. You should expect some rain every other day or so and will definitely need a jacket, especially at night.
The average maximum temperature in Bilbao in January is 55°F/13°C and the average minimum temperature is 43°F/6°C. Note that it will get a lot colder the further in land you go.
Weather in North-West Spain in JanuaryBy being incredibly wet, Galicia escapes some of the cold experienced in the rest of Spain in January. But with rain expected on two-out-of-three days, you might welcome a cold, dry day occasionally!
The average maximum temperature in Santiago de Compostela in January is 55°F/13°C and the average minimum temperature is 46°F/8°C.
Read more about North-West Spain