Highly likely to be your nework.
Each device will have differing wifi signal/strength even in the same room.
Unless you have some security software affecting Macbook comms or the router is playing up (restart it), it is highly likely that interference or poor network signal is affecting the Macbooks ability to send stuff to AppleTV.
Is this using Airplay mirroring (which I don't use as my Macs are too old) or are you playing something in iTunes and using AppleTV as an Airplay destination - if the latter far far better to use AppleTV's Computers icon to access the iTunes library.
iTunes mirroring is a compromise - it is effectively a screen sharing protocol and requires the Macbook to compress the video frames, losing quality (same with iPad mirroring) but depending on content played or other tasks running it might have trouble keeping up.
To try to pin it down connect the Macbook via ethernet to the router - if that works ok it's almost certainly that teh Macbook to AppleTV wifi connection (via router) isn't up to the job.