This largely depends on how you plan to transfer the files.
Over a local network - yes, both need to be on as the files are being streamed directly from one pc to the other.
Using cloud storage as an intermediary - no, but you will need to turn on the pc you're working on at that time.
External drive - no, you only need to turn on the pc you're working on at that time.