The first Glock I ever shot was a 23C. I did a quarter-sized group at 5 yards.
I own a G17 and will probably be getting a G26 soon (both 9mm).
I have found with the Glock what works best for me is to put the dot on the front sight in the dead-center middle of the square the rear sight forms. (Think of the rear sight as the lower half of a square.) Place the dot over where you want the bullet to hit.
Like others have said, the trigger pull on the Glock is critical. I found doing the $0.25 trigger job helped smooth the pull tremendously:
http://www.alpharubicon.com/mrpoyz/glock/
I went down to the 3.5 lb. spring, but my accuracy suffered and I went back to the 5 lb. spring.