Obviously you cannot change planet's orbit or positioning, at least without seriously affecting it's climate, gravity, and environmental conditions to extents where life on the planet is impossible or even you completely destroy it... so there must be some degree of control over the fired beam.
In fact, the scene where four planets are destroyed with a single firing of the weapon instills this idea, as what initially is a single beam splits into four different beams that seems to bend slightly their trajectories to reach different targets widely separated.
My guess is that there's some sort of "carrier" inside the beam that can hold the energy for the impact and guide or follow a determinate path to the target.