This is from Star Wars Episode IV:
A New Hope .
In the video of this scene (0:14), we can clearly see this particular stormtrooper (circled in red) aim down the sight and fire at Han :
scifi.stackexchange.com/users/40294/Praxis
Since you've asked for any medium, the most unambiguous way to confirm that stormtroopers used their sights is using a video game.
Here's a gif (taken from 2:14 of this Youtube video ) of a cold weather assault stormtrooper (snowtrooper) using the sight on his E-11 to get headshots on Rebel soldiers at the Battle of Hoth (from Star Wars:
Battlefront II ):
And here's a similar gif (taken from 32:40 of this Youtube video ) from DICE 's new Star Wars: Battlefront (which is largely canon ): Notice that this snowtrooper's HUD is displaying a note that he's already killed fifteen Rebels while he kills his sixteenth.
These snowtroopers prove that Imperial troops can be quite effective and deadly, contrary to certain naysayers!
We know these are snowtroopers because (a) snowtroopers formed the Imperial infantry at the Battle of Hoth and (b) a few seconds after the indicated time in the second clip
we see the snowtrooper with
his E-11:
As a bonus, both gifs show that the sight is a scope since there is some magnification when aiming down it.
scifi.stackexchange.com/users/31936/Null
During the Battle of Endor: And of course, this guy shot Artoo.
I originally did not include this shot that hit Leia, because I feel it is ambiguous whether the scope is in use or not.
scifi.stackexchange.com/users/4985/William Jackson
No.
There is no canon explanation why helmeted soldiers with limited vision would be able to make use of a scope on a rifle they mostly hip fire anyway.
There is one example of a stormtrooper raising their rifle to fire, but in this example it cannot be made out whether the stormtrooper is using their scope or merely raising their rifle to brace for recoil (maybe this explains why they are usually so inaccurate when firing from their hip?).
An out of universe answer would be the reason they added the scopes to the E-11 Blaster Rifle was to make it better replicate existing earth weapons, even though the Blaster rifles in the star wars universe are rarely used for long distance pitched assaults, but more frequently for corridor shootouts.
The analysis I have made upon the aforementioned scene where a stormtrooper appears to raise their weapon is as follows: You can clearly see from the diagram below the orientation of the gun and the stormtroopers visor do not line up The stormtroopers helmet eye-holes do not line up to the scope
A better explained theory as to what the stormtrooper is doing is as follows:
The stormtrooper, seeing Han has raised his weapon in order to improve accuracy by reducing the recoil on his blaster.
scifi.stackexchange.com/users/47892/FiringSquadWitness
Out of universe, and not an answer, but interesting and too much for a comment...
The E-11 blaster prop is a modified Sterling sub-machine gun .
The scope is not a rifle scope, but a 1.44x scope from a Sherman tank !
An inappropriate scope, plus the helmet, probably made it very difficult for the actors to see through.
M40 scope M38 scope .
scifi.stackexchange.com/users/1441/Schwern
This is an E-11 blaster rifle:   It was standard issue for stormtroopers and makes many, many appearances in various  Star Wars  works.   Recently, I noticed this:   These guns have sights. I can't recall ever seeing these sights used in any medium. Does anyone know if they ever had been used? It would seem that it would really help with the stormtroopers' aiming issues.
Do Stormtroopers ever use the sights of their E-11 blaster rifles?
scifi.stackexchange.com
<star-wars><star-wars-legends><weapon><stormtroopers>
scifi.stackexchange.com/questions/102487
scifi.stackexchange.com/users/51226/Rogue Jedi
There does not seem to much any evidence that storm troopers ever used the scopes on their weapons, although it would also be fair to say that it would be difficult to use since the storm troopers wore helmets. One scene does seem to show a storm trooper using their scope. There are various opinions: that the scope is used in Star Wars IV, that it is used in video games, that it is used in the Battle of Endor, that it is not used and that it is copied from the real-world Sherman tank.
A scope is used in Star Wars IV. The scopes are used in video games. The scope is used in the Battle of Endor. The scope is not used - it is only added to make the blaster look more like earth weapons. The blaster is a modified Sterling sub-machine gun and the scope is taken from a Sherman tank.