One of the signature weapons of Starscream and the Seekers, the null-ray is capable of stopping any electrical device with one shot, be it human or Transformer except Megatron. All a blast from the null-ray does is make him angry. It doesn't work on the Dinobots either, but they were already aggravated at Starscream and the jets.
Generation One cartoon
After causing a tidal wave at Sherman Dam, Megatron ordered Starscream to shoot three of the generators with blasts from the null-ray as part of their efforts to make Energon cubes. Why they would need the generators to stop working is beyond our understanding, but Megatron's schemes always have layers within them, and are far too complex for simple flesh creatures to understand.
Later, when Megatron had the power chip rectifiers of the Decepticons installed in him before his battle with Optimus Prime, Starscream lamented that he could no longer use the null-ray or his cluster bombs. A threat of termination from Megatron shut him up.
Determined not to be replaced by the human-built Nightbird, Starscream used his null-ray to fritz her circuits. Naturally, Megatron wasn't too happy about the loss of his new female "companion" and immediately labeled Starscream a traitor. Again.
Later, Starscream was shown firing the null-ray from his nose while in vehicle mode. . Later still, he was shown firing it through his finger.
Starscream last used his null-ray at his own coronation as leader of the Decepticons. During the coronation, the Constructicons played trumpets, but Starscream, eager to get on with the ceremony, used the null-ray to slice the instruments in half.
In 2005, Marissa Faireborn had a hand-held blaster which fired Null-rays. Whether this was reverse engineered from a captured Seeker, developed with the help of the Autobots, or was acquired by some sort of convoluted plan of Starscream's to replace Megatron, is unknown.
Transformers Armada PS2 game
In this incarnation it slices mountains in half instead of its usual effect. It most likely does the same to Autobots, but Starscream was bashed offline by Optimus Prime before he could test that theory.
Transformers (2007 movie)
In the movie franchise, the null-ray is represented by a set of rocket launchers used by Starscream. Perhaps not the best way to convey the idea of a ray, but lasers don't explode, do they?
Revenge of the Fallen film
After Soundwave alerted the Decepticons that Sam had been found in Egypt, Starscream flew in and used his null-ray to disable the NEST soldiers electrical systems. This version of the null-ray appears to be more like an EMP in design and function rather than an actual weapon. 
One of the newest Starscreams also packs null-rays as his main weapon, but these also just work like a very powerful Sonic Blaster. Their destructive effect on Earth-made buildings is impressive, if not as intense as Armada Starscream's, and a sustained blast of around 12 seconds was enough to render all five Earth-bound Autobots unconscious—for a few seconds. Hmm. Then later a direct blast fully disabled Ultra Magnus for several minutes.
War for Cybertron
The null-ray makes an appearance in the game as well, though in a different form than in previous fictions. Here, null-rays are high-powered sniper rifles that can be carried and wielded one at a time in characters' humanoid modes. Starscream carries one by default, and they are available as pickups in most of the game's missions. They are very effective against ground targets, and good against air targets as well, assuming they're hovering and will just sit still long enough to get shot. Usually, they are one shot kills to the head.
- Clearly, Starscream never bothered to patent the null-ray. Bad enough a G.I.Joe agent's daughter used them, but so did Generation One Whirl.
- In Japanese media, null-ray was called "Naru Beam" (ナルビーム).
- Mirage's Sniper Rifle in Dark of the Moon game share the same function as the War for Cybertron Null-ray.
- Starscream uses a Nucleon Charge Rifle in Fall of Cybertron, which is also a high-powered sniper rifle, like a fair amount of the weapons, it could just be a remodel/new name of the previous game's weapon.