One full day is adequate for Malaga
I would say that 1 day in Malaga is enough for a good idea of the city before you head out to see the other towns on the rest of the Costa del Sol. In one day, you can get a good flavor of the city, its museums, culture, and food. There are several museums in Malaga - The Picasso Museum, Russian Museum and Automobile and Fashion Museum etc. If you have only one day, you should prioritize and visit only 2 museums as each museum is worth 2 hours.
Costa del Sol needs a week
I am assuming you will have already planned to spend at least 4 days in inland Andalucia before you arrive at the coast. That will give you six days in Costa del Sol though there is enough in Costa del Sol to keep you occupied for a week.
Tourists prefer to stay in small beach towns rather than relatively larger towns like Malaga. There are many lovely towns along the Costa del Sol and you will be spoilt for choice. Nerja is one of my favorites, as are Frigiliana and Marbella.