In Batman v Superman: Dawn of Justice, during the actual fight scene between Batman and Superman, Batman wears a heavily armored suit. Why did the cowl have blue flashlights glowing from his eyes? What was their role in the rest of the suit as we can clearly see was heavily armored? Was it due to rain that he needed them, because in the previous series he never had this kind of a suit?
In the movie and in the comics, the eyes glow because they need a way to inform the audience that the suit is a powered robotic suit. Glowing mechanical eyes are the quickest way to get that across. It's done for pretty much any powered exo-suit like Iron Man, Terminators, etc. It also represents a "I'm done playing games" effect.
But it's also done because not only is it from the source comic, Frank Miller's "The Dark Knight Returns", and the animated adaptation, but Batman has a long history of glowing eyes.
Batman doesn't always wear a simple cowl with holes in it. Just like how his suit varies, sometimes plain, sometimes more advanced. Sometimes, he has lenses or active electronics that provide a variety of tools, as he's known to do.
Batman Forever, in the "You're as blind as a bat" scene, Val Kilmer's Batman pulls out the tech (Night-Vision, Tracking/Trajectory Calculations, Auto-Darkening to prevent the flash from disorienting him):
The Dark Knight also did it, with Bale's cellular sonar gimmick:
Terry McGuinnis, Bruce Wayne's half clone son, from Batman Beyond also had it, glowing eyes included. Of course, his suit is a futuristic powered exo-suit as well, but instead of clunky metal armor, it's cloth-like future-tech. It's essentially the end goal of the Batsuit's ever growing technological improvements:
Also in Batman Beyond, when Bruce could no longer use a the Batsuit due to old age and lowered strength/reflexes, he used a mechanized exo-suit, the Bat Armor:
A nice description from The Batman Handbook: The Ultimate Training Manual Page 72-73. The link leads to Google Books preview of the pages.
Batman, meanwhile, has to resort to technological tricks such as night-vision devices and infrared illuminators to maneuver deftly through the dark.
I can't source this image, but I believe it comes from the Michael Keaton era Batman movie:
This is without going into specialty Batsuits! Heck, here is a (probably outdated) list of 20 or so suits, most of which are powered and have glowing eyes, just from the New 52, aka 2011 to 2016.
As a side note:
Whenever you see Batman just by his eyes in the dark, it's the same effect as cat or animal eyes in the dark, via Tapetum lucidum. His tech is reflecting the light through the lenses so much that they glow at the right angle. That's the supposed reasoning behind the stylistic approach in most comics and cartoons.