Obi Wan Kenobi pointed this out in Star Wars A New Hope. However we did not see such accuracy in most of the films.
CarRacerGVR4 goes to disprove this terrible stereotype perpetuated by Star Wars fans by participating in a USPSA match using a JP Rifles 9mm carbine in Pistol Caliber Carbine division. With the helmet on, he did a pretty good job hip firing. Actually he used a Viridian laser. Not sure if lasers are allowed in PCC division but this looks to be a local match and he probably did this as a fun run.
Here is another stage where he shot it ala “Skywalker style” with out his helmet.
I wonder if he tried a PCC with a folding stock and sling the weapon like SAS. That might allow him to aim with his helmet on.