The first line of the Rogue One novelisation pretty much gives the game away.
Galen Erso was not a good farmer.
Someone with Erso's obvious talents, intellect and the financial backing to buy a farm (but near-total incompetence as a farmer and zero interest in buying outland tools and materials), turning up with his family in tow onto a small agrarian planet with a population of less than 500 souls would raise all kinds of eyebrows with the locals. Eventually that information would make its way to Imperial sources and get flagged as something of interest to be investigated.
Since Erso has made no effort to change his physical appearance, split from his wife or keep his child out of view, his personal and familial profile would exactly meet the Empire's watch-list of 'individuals of concern'.
Star Wars: Propaganda
We also learn (in Catalyst: A Rogue One Novel) that Saw Gererra cased the planet for them and bought the homestead through a front company, so it's possible that Erso was tagged as a possible Rebel by others in the community.
“I think I’ve found the perfect place,” Saw told her parents. “Remote. A bit desolate, but tranquil.” He nodded his chin toward Jyn. “Plenty of room for this one to run around.” He pulled his datapad from his pant pocket and showed them the image of a green, black, and blue planet with a wide ring. “It’s called Lah’mu.”
Papa looked at the image and said, “It looks unspoiled.”
“It’s getting harder and harder to find worlds the Empire hasn’t swept into its grasp,” Saw said. “More and more star systems are knuckling under; more and more planets are being ravaged and sucked dry for resources. Lah’mu is one of the exceptions.”