EDIT: Had stuff backwards at first
Right, so Guy-Lussac's law has little to do with this, I was misinterpreting it. As you heat air, it rises due to the differential density of the atmosphere (due to gravity pulling it tighter lower and looser higher). If this were the only effect, it would be hotter higher up than lower down. However, what we notice is the exact opposite - Hence, GL's law is not the whole story.
IANAC, but I suspect that what happens is that it's exactly as the OP said - sun heats earth, earth radiates heat back out, warming air which rises as a result. This is why it typically doesn't get SUPER hot or SUPER cold anywhere on the earth's surface, and also explains why mountains are cold - as air rises, it has more volume to fill (larger sphere = larger volume), so it disperses and cools, even though the mountain is radiating heat.