Arriving Terminal 4 and of the multiple possibilities for getting to Sol, using cercanias seems the most straightforward public transportation route. Google returns trips with different transfer points (Chamartin, Nuevos Ministerios, Atocha) depending on departure time. I'm guessing it just picks the quickest for that moment. No significant differences in total travel time and Chamartin would seem to make geographical sense as you're not backtracking. But the only other issue that comes to mind may be - Is one station be preferred to others for ease of transfer with carryon luggage only?
Renfe site returns Chamartin as a sole transfer option but they also list C10 as a possible departure - the map I have doesn't show it going to Barajas Terminal 4. In addition to C3 it also lists c4a and b. Those are variants of C4 I assume?