You can't use lasers or guns under water
Lasers: Water refracts and absorbed lasers. Every 10m that your laser travels, it will loose 1/2 of its potential energy. So even if your "bottom of the ocean" is somewhere relatively shallow like on a continental shelf at a depth of 100 meters, that means your laser will lose 99.9% of its energy before even making it to the dome. Furthermore, as it heats up the surface water boiling it, the bubbles and steam will cause extra refraction making the water essentially opaque to your laser long before your beam can cause any significant heating to the dome.
Bullets: Drag is amplified based on how fast you are going and your proportional size. Because water already has a lot of drag, and bullets do all of their acceleration on the front end, a standard firearm can only pernitrate a few feet of water before coming to a complete stop and just sinking at it's terminal fall velocity which will not be very fast at all. The most specialized underwater bullet in the world, the CAV-X, has an anti-material range of 17m and an absolute maximum range of 60m which still is not enough to reach your city.
This leaves you with Torpedoes and Depth Charges
When going for range under water, big, slow and steady wins the race. A torpedo can go much farther than a bullet using the same amount of energy. Part of this is because drag is exponentially proportional to your speed. While an average bullet travels at over 300mps, an average modern torpedo moves at only 25 mps, using sustained acceleration. This means the an average torpedo has ~150 times less drag for its surface area than your average handgun. Also, keeping the propellant onboard means that the torpedo tends to be much bigger and longer for its proportional effect compared to a bullet. Because the square-cube law applies to resistance, a large object moving though water tends to experience much less resistance compared to its size than a bullet. It's like the difference between a bug being able to stand on water and a human sinking into it. Torpedoes can also use more energy dense fuel sources than bullets, and can take advantage of creating a sustained bubble jacket around them for more thrust and reduced drag. All these advantages add up to ranges that are measured in kilometers, not meters.
If you're going for a more low tech weapon, then use depth charges. Powered by gravity, you can simply sink them and have them explode when they hit the dome.
Why the underwater city did not completely fail from the bombardment
In the contest between a large explosive weapon and a glass dome, it sounds safe to say that the explosive will win hands down. That said, when building for large scale habitat for hazardous environments, redundancy is a key safety feature. Many large naval ships and submarines use double and segmented hulls allowing them to take structural damage without losing the whole ship. So, it is safe to say that your under water people building something the size of a city would do the same.
The way a double hulled dome would work is that you have 2 domes, one inside the other. The torpedoes and depth charges could blast holes in the outer dome, but unless two shots hit in the exact same place, the inner dome would be fine. It is also important to make sure the dome is cellular because glass shatters; so, if the outer hull is made up of 1 meter glass hexagons, then when a torpedo hits one, it would limit the damage to a smaller area. Basically, your outer dome would work like the ceramic tiles in often found in flexible riffle armor where they are designed to shatter.
As for segmenting your city, you are probably picturing a giant dome covering a bunch of terrestrial style buildings. But this is horribly unsafe meaning you are just one mechanical failure away from instant death. Instead each building under the dome could be an individually functional underwater environment. This way, if the dome ever breaches, they can all just retreat indoors while the engineers patch and drain the dome. Or, and ever better approach would be to ditch the giant dome all together and go with many smaller domes connected by airlocks.
The best thing about segmentation is that you can plausibly lose specific systems an not others. So, perhaps the city still has power and O2 scrubbers so your heroes don't instantly die, but perhaps the water purification dome and communications systems were destroyed during the bombardment because they were in domes that got hit.