Prior to the destruction of his ship, Varley discovered the coordinates of the planet Iconia, and violated the Romulan Neutral Zone in order to arrive there before the Romulans. He later sent a transmission to his old friend, Captain Jean-Luc Picard on the USS Enterprise-D, when the Yamato became infected with an Iconian software transmission, disabling, and eventually destroying the ship, killing Varley, and everyone on board. (TNG: "Contagion")
The script for "Contagion" describes Varley as "about Picard's age, but brawnier and white-haired." The script also says of the scene in which he appears; "Varley is a man under intense pressure who is burying it deep. He's had to call on an old friend for help. He feels helpless and frightened. He has also committed a major offense by entering the Neutral Zone. He's talking a little off the top of his head." 
Varley is featured heavily in the Star Trek: The Lost Era novel The Buried Age, in which it states he attended Starfleet Academy in the 2320s, where he also took one of Professor Richard Galen's archaeology classes. Both Varley and his classmate Jean-Luc Picard developed a profound interest in archaeology at this time, especially as it related to the long-dead Iconian civilization. The novel also details that in 2355, Varley sent Picard his condolences after the loss of the USS Stargazer. During the next few years, Varley and Picard kept in touch, and Varley frequently assisted Picard's independent research with Starfleet resources. In 2358, he provided Picard with Starfleet navigational charts of the Scorpius Reach; he was interested in joining Picard on an expedition to that area, but felt obligated to stand by Starfleet due to tensions with the Cardassians. The next year, he recommended that Picard contact Captain Onna Karapleedeez when her ship, the USS Mary Kingsley, entered the Scorpius Reach. It gives the date Varley assumed command of the Yamato as 2363, two years prior to the events depicted in "Contagion."