Plasma weapons in Fallout 4 are relatively rare because of how powerful they are. You'll almost certainly not find one before level 20 and if you do you'll most likely be out of ammo for it with no way of getting more as the plasma cartridges are some of the most expensive ammunition in the game. Ultimately random drops are random and so you may find them anywhere, higher level enemies are far more likely to carry one than lower level enemies though.
You're far more likely to find a plasma pistol than any other form factor, but this can be upgraded into a rifle using the weapons bench as required, and to that end, there is normally a plasma pistol being stored inside the Mass Pike Tunnel West (near Diamond City), inside the room containing a steamer trunk with a Plasma Pistol inside.
The "best" plasma weapons in the game are the unique faction variants such as Experiment 18-A, which can be purchased from a synth vendor in the Institute, and the AX90 Fury or Sentinel's Plasmacaster, which can be purchased aboard the Prydwen.