Even simpler!
touch -a -r sourcefile destinationfile
This only changes access time, while my other example changed both access and modification time on the destination. See man touch
for details.
Note: on MacOS 11.16, 10.14 (and probably earlier), if the touched file is non-zero length and in a folder indexed by Spotlight, Spotlight will update the access time to the current time soon after the access time is set. Preferences/Spotlight/Privacy can be used to exclude folders from Spotlight indexing.
Note: On macOS 11.6, 10.14 (and probably earlier), if the touched file is non-zero length and in a folder indexed by Spotlight, Spotlight will update the access time to the current time soon after the access time is set. Preferences/Spotlight/Privacy can be used to exclude folders from Spotlight indexing.