Zarya's core game mechanic is keeping her energy level charged through the use of well-timed shields. The higher her energy, the more damage she deals. As is the case with all heroes, the more damage you apply to enemies, the faster your ult charges. Thus, the key to playing Zarya well is knowing (and reacting to) the best time to shield both yourself and your allies.
The reason pro players seem to charge their ults so quickly is because they keep their average energy level higher than the typical Zarya player. They are able to read the flow of battle and react quickly when (for example) they see their support Mercy get hooked by an enemy Roadhog. Not only does this save the support, but it also gives Zarya a 40% boost to her energy (and damage)!
As for the most efficient method of damage to charge her ult, that depends on the situation. When attacking single targets, her beam is definitely stronger - it does twice the damage per second that her lobbed charge does (95 dps vs 45 dps at 0 charge), assuming your tracking is adequate. However, because the lobbed charge does splash damage, it is more effective to use the lobbed charge if there are 3 or more people grouped up together (95 dps x one enemy vs 45 dps x 3 enemies = 135 dps).