Is there a price difference when buying a train ticket in Geneva Airport automatic machine or pre ordering online?
Swiss Railways offers SuperSaver tickets that are available, I believe, only on their website or mobile app, with non-refundable advance purchase. These are limited in number and definitely not available on all routes. At least according to their site, they are not available at the station, neither from an agent nor from a machine.
As of 2013, there was no difference in price between the agent and the nearby machine for a train that was leaving in a few minutes.
Normal tickets are the same price, regardless of where or when they are bought. So it does not matter if you do this on line, at a manned ticket counter, or from a ticket vending machine. Such tickets are flexible, valid on any train on the route you purchased. Be aware that you cannot buy tickets on the train however.
Supersaver tickets are cheaper, but can only be bought on line or using the phone app. They are also not flexible.
When arriving by plane and continuing to a destination in Switzerland that is a non trivial distance away from Geneva getting a Saver Day Pass may be a good option. This is a fairly new product that when booked in advance can be cheaper than just buying a normal ticket on arrival.