I think the only canon in any way, shape, or form that suggests how the Decepticons knew to come to Earth...had nothing to do with the Cube. In the IDW "prequel" series Ghosts of the Past (I think that was the title?), a secret space mission is launched while all the media attention is on the Apollo 11 launch media circus. The secret ship, the Ghost 1, is an S7 creation that ends up going into the middle of a space battle between the Autobots and the Decepticons. The crew of Ghost 1 end up sacrificing themselves to save the Autobots (or so the wiki says, I've never actually read this thing), and both Bots and Cons realize the technology of Ghost 1 is strikingly similar to their own, meaning these organics somehow got Cybertronian technology, even in a primitive state. They then somehow trace the origin of the ship back to Earth. The 2007 movie does support that the only reason the Decepticons show up is because they think Megatron is on the planet - as evidenced by how the focus of both Blackout's and Frenzy's network attacks are directed at S7, specifically anything about the "iceman" - which gives them the name Witwicky, which in turn gives them Ladiesman217 listing glasses with microscopic cybertronian etchings. Ironically, the coordinates in the glasses point to the Cube at Hoover Dam, which they're not mainly searching for, but thanks to the humans moving Megatron in the 30s right next to the thing, it would have given them their cake and let them eat it, too, so to speak.