The problem with how a creature could evolve to use light as a weapon is inherent to the issue presented - light does not make a very good weapon.
Even with all the technology that we currently have, light has several very important disadvantages:
* poor efficiency of generating mechanisms when approaching damage-dealing energy levels
* very poor energy transfer
* is easily deflected or absorbed by even the most rudimentary armor (shiny or dark and matte, temperature-resistant material)
* needs to be focused and directed or it dissipates
* susceptible to environmental disturbance (dust, fog etc. blocks it)
* telegraphs attacker's position when used
Thus in a fight light is usually used as a distraction, lure, stunning mechanism or for communication.
However, if we put all of these aside, how would that happen?
Light may be used to blind the enemy, which is an attack in its own right. It could be used as a defense mechanism, assuming the predator usually looks at his target, a sudden flash of light might blind or stun him. However, biological mechanism used to generate sufficient amount of light might be tricky to design. You could consider plants that have an amount of flash powder in a pod-like or hard shelled compartments used to discourage foraging animals.
A predator could be using external light sources, e.g. 477
biological lenses to focus sun's rays on it's prey. While this would be a cool way to cook its meal in the process, it is rather complicated and unnecessary.
For a laser-like damaging light, forget it. Biological sources don't generate nearly enough energy to be converted to a laser-like beam. Also, coherent light emitted by lasers requires much better quality of optics than anything known to biology.
The question behind a question is in fact the issue with inefficiency and difficulty employing this mode of attack. Unless you would design your world using very strange, pro-light anti-claw characteristics, a good old rip & tear will trump shine & burn anytime. And since you ask about such weaponry as an effect of evolution, which assumes light would be somehow preferable as a weapon to other ones, it simply wouldn't happen. 477