Cybertron originally orbited the sun known as Alpha Centauri, located in the Milky Way. However, millennia of fighting dislodged it from the star's orbit.
Cybertron's original location is unknown, although Starscream and Skyfire seemingly flew from there to Earth under their own power millions of years ago. Fire in the Sky In the 1980s, Omega Supreme and other Transformers often flew between the worlds without the aid of large ships or space bridges. This strongly implies that Cybertron is located in the Milky Way, or at the very least in one of its small satellite galaxies. Countdown to Extinction The Key to Vector Sigma, Part 1 War Dawn
As in the Marvel comics, Cybertron orbits Alpha Centuari.
Cybertron is located in the Milky Way galaxy, somewhere in the direction of the constellation Scorpius.