Before going to a wedding in Seville, we are going to fly in to Barcelona, stay a few days, then take the high speed train along the beaches down to Malaga.
We would like to stay one night in one of the cities along the coast to break up the 12-ish hour train ride from Barcelona.
Where do you recommend stopping for a night along the coast?
Examples: Valencia, Murcia, or Granada
There is no rail line running along the coast all the way from Barcelona to Malaga. Not even close. The fastest route from Barcelona to Malaga (6 to 7 hours) doesn't go through any of the cities you mentioned; it passes through Zaragoza, Madrid and Cordoba on the way to Malaga. In 8 hours or more you can travel from Barcelona to Valencia then take an inland route through Cordoba (and often also through Madrid) on the way to Malaga.
You can probably piece together a 12-hour route--including considerable time on slower trains--that doesn't spend as much time in central Spain, but this schematic map on renfe.com shows you will rarely approach the coast after you leave Valencia:
Renfe AVE and high-speed long distance rail lines
The AVE lines are in red/magenta on the map.
My first choice among the cities you list would be Granada, but it's not on the coast, it's way past the midpoint of the trip, and one night there wouldn't necessarily provide sufficient time to see the Alhambra. My second choice would be Valencia, but it's way before the mid-point of the trip.
I wouldn't spend 12 hours on trains to get to Malaga if the only pay-off was a few hours in a city along the way. Spain has many very interesting cities, but much of the terrain is blah. I don't know that the route you're thinking of taking would provide enough of a scenic payoff to justify anything like 12 hours of train time. I'd consider flying or taking AVEs through Madrid if you are strongly averse to flying.
I would fly from BCN to southern Spain, say into Seville or Granada if you have extra nights to spend. Then bus or train to Malaga. J