I know the Vis. Dictionary has some details on the DH-17's use in the Empire and the Alliance... My take goes something like this though.
Throughtout the ot we see a variety of sidearms for both militaries though... Especially the rebels. On Hoth they can be seen with the "DH-17" blaster pistol (I like to think of it as kind of a "heavy blaster pistol" in that it packs a bit of a punch, and thus it makes for something MORE than a sidearm, but less than an automatic weapon), but also they're seen with Ponda Baba's styled pistol pretty commonly with various "grips" too, some sloped ala Ponda's and some more curved like a regular pistol grip. They also can be seen with a pistol based on a Mauser style handgun base as a sidearm I believe.... That's just on Hoth.
In ANH it seems the Rebels just have the DH-17, however the troopers we see using weapons are really only the opening scene Fleet Troopers and we never get a good look at the base rebels... I think it'd be pretty likely these guys have a mix of weaponry for any given rebel detachment, and I think the big rifles we see on Hoth would be available to these men as well... Maybe even aboard the Tantive IV for "away missions" (sorry for the Trek reference) but not fightin aboard ship like they were.
Anyway, the Imperials really aren't much different... Especially in ANH. If you look closely you can see them using E-11's, DH-17's, and yes, even a mauser-based pistol ala Han's DL-44. However, I don't think that blaster is "close" to Han's, it's just similar, and I believe I've seen a still of it and it has a much snubbier nose/barrel to it than Han's and such.
Now, why do they have the same weaponry?
I think some good points have already been brought up... The rebels pilfer what they can, I think that's a pretty much given. However consider this... Weaponry, especially blasters, seem in no short supply in the galaxy. Readily available, handy, used by, well, almost everyone we see to some extent it seems. At least in places outside the core or outside a civilized area. It's implied and shown though that even in the core worlds there are people wandering around armed all over the place. Bounty Hunters roaming, people in nightclubs with sidearms on and visible, etc., etc... So what's the point?
Well I mean to say that blasters aren't necessarilly "Rebel" or "Imperial" at all... Ponda Baba's blaster for instance, is seen drawn on the heroes in the Cantina. Flash forward to Hoth, and the Troopers defending Echo Base clearly have this blaster in varying styles with them, and other blasters too (their rifle armaments are REALLY diverse. Much more so than folks realize). The DH-17 could be a commonly used blaster pistol throughout the galaxy, manufactured by, uh, whoever I guess, and sold... Maybe it's a good knockdown blaster and the military appreciates it for accuracy, rate of semi-auto fire, durability/reliability, and power... If it's a readily available weapon to the public though, neither the Empire nor the Alliance has a claim to the weapon obviously and it would be popular with BOTH militaries in the conflict and beyond I'd assume.
Now, I think some weapons probably ARE exclusive to a single military... The E-11, the Sandtrooper style rifles... These seem, to me, to be IMperial exclusives... Now, that's not to say Rebels don't steal them and make use of them. It's just something I like to think of as "tailor made" to the Empire's needs as a military with good financial backing. They of course can get things done by the manufacturers with some level of exclusivity, it makes some sense. But theft of these, and subsequent use by the Alliance makes complete sense to me...
Also though, the Alliance is just smaller by comparison, so I can see them having their own weapons plants cranking out blasters for their troopers. These would maybe be based completely on existing weapon designs though, so they'd be copies of course, but I don't see the Alliance stealing EVERYTHING they use... Just some, and generally for either assimilation/ammo or to be given to smaller Rebel Cells on worlds not under the greater Rebel military umbrella... Like Dresellian Commando teams on their home planet for instance, or perhaps a hypothetical Mustafarian resistance force maybe...
Another interesting thing is ammo... I really look at Star Wars as a very modular fictional galaxy in some ways... A galaxy where one ammo pack can be hooked up to a completely different weapon and it'll work for instance. Like an E-11's ammo pack would fit a DH-17, or a DL-44, and charge it on up. The movies don't give good ideas of ammo/reloading though, and many games didn't either... Dark Forces really took the most time with that at first, and it gave loads of Ammo to the user. I think that works for weapons like the E-11 and fits with the films though...
DF/Jedi Knight also were the first games to establish WHY Stormtroopers aim sucks as it does... It doesn't suck so much as the E-11 is an eratic, "spray and pray" type weapon... The Stormies have other weapons at their disposal though,a s we see on the Death Star, Tatooine... I think Tatooine is the best single example in the films of Stormtroopers "in the field", showing what their regular day-to-day gear would be for actual combat situations as opposed to ship/instillation security jobs.
You see their modular packs on Tatooine, their rank identification system for the field, and you see their weapons that are better for open terrain as opposed to close-quarters combat.
Anyway I talked enough about this... In short, I think the "Rebel" blaster as it's come to be known, is really nothing more than a widely available blaster to the public as well as the military. Rebels get them however they can, possibly even producing them in safe world factories (copies of the blastech design). The Empire would obviously likely be contracting theirs from Blastech though, and just enjoy the blaster for the same reasons the Alliance does, and thus both use them extensively.