intentionally blinding your enemies with a laser is against international law.
https://en.wikipedia.org/wiki/Protocol_on_Blinding_Laser_Weaponsemploying a laser for other purposes is legally tricky, because it might still get you in trouble or damage international relations more than it's worth.
lasers as point defence (against drones and missiles and such) are being tested and seem to be effective
https://www.youtube.com/watch?v=xP94wR-wq4g here's a drone getting fucked
https://www.youtube.com/watch?v=tyUh_xSjvXQ there's a somali pirate boat getting its RPG exploded remotely
using lasers to attack other ships (unless they're tiny pirate nutshells) is not viable, because the range of a laser is limited to line of sight, while cannons, torpedos, missiles go far far beyond that. you'd get shelled to oblivion before you even come close to an enemy ship.
naval use also seems more likely than use on land, simply because of things like hills or trees or buildings. also a high powered laser needs a lot of power and putting it on a big ship that has its own nuclear reactor just seems like the right thing to do.