It is actually rather easy to do this.
First, you need a cool gun, You already have on of those, so then next step is to make it my favorite color blue - 1BC8F7.
You can skip that step if you want, but the gun looks so much nicer blue :-)
I assume you are giving the gun recoil with logic like this.

To make your gun be able to aim from the sights, parent the gun to an empty.

The empty should be parented to the camera.

Now, if we move the camera, everything should move with it.

This is good. Now, your recoil animation can play on the gun, but it will not move into place yet.

We can fix this by animating the empty to move into place when the mouse is clicked, and then move back out of place when the mouse is released.

Believe it or not, we can do this with one animation. I am going to be using the right mouse button to aim the gun to the center, because it makes funner gameplay, however, it is just a simple to do it with the left mouse..

This is using the right mouse to aim the gun into place.

It works- Yay!
Now for the left mouse.
You only need to change a few things to your existing logic on the empty, to get this setup.

I added a simply ground plane to see the gun's movement better.

Now we need to add a Mouse Look actuator

Now, we can test it.

I'm not happy with that quite yet, so I'm going to add a slow parent to the empty.

Now we can test it.

That looks much better! You could, of course, tweak the settings to make it exactly how you want your gun. I think bullets and muzzle flashes would seriously help - but they have nothing to do with this answer :-(