Like so many "versus" threads here, it's a false and misleading dichotomy. (No offense meant.) There is no opposition between the two: you do both.
For one thing, it's generally the chords that determine what the key is in the first place! They're not two separate things. You might be laboring under the impression that playing in C means that you can just wander around in the C scale, or that you can only ever use the notes from the C scale. Neither is true at all. Playing in C means that the harmony has established the key of C major.
Look at it this way. You always have to play the chords of the song because, well, those are the chords of the song. But how you emphasize them or connect them is governed by how they're working or functioning together, which means how you understand what they're doing in the tonality/key/modality that's happening. For instance, if you're going from a G chord to a C chord, how you connect them and how you deal with them could differ, depending on whether you understand that chord sequence as a I-IV in the key of G or as a V-I in the key of C.