The MP7 is the first sub machine gun you unlock in Black Ops 2. It has high damage but a low fire rate alongside reasonable recoil. It is best suited to offensive objective pushing in the front of the battle. However, the MP7 is reasonably good at long range encounters.
There is a YouTube video at the end of this post with a video version of this guide.
The fact that the MP7 has high damage, low fire rate and reasonable recoil lends itself very well to the front line attack. You need to be on the move towards the next objective as soon as possible and get into as many close quarter gunfights as possible, because that is where the MP7 shines. When you see an enemy start hip firing and once you have started firing aim down the sights on him. Whilst you do that strafe to the left or right, depending on which is easier, to avoid the enemies fire.
The class setup I recommend for the MP7 is designed to support the offensive style the MP7 is good at. This is the class setup I recommend:
Lightweight is there to help you flank better and faster. Toughness supports the aim down sight fire you will have to do since the MP7 isn’t very good at hip firing. Tactical Mask helps capture objectives on which people like to throw all sorts of tactical grenades. I recommend you use Semtex because the frag grenade is a bit slower, but it is up to your own preference. The same is for the tactical grenade, although I recommend using the flash or concussion grenade.
A pistol is always a good secondary as it is very fast to switch to when your gun runs dry. Any pistol is pretty good as far as I can tell. The grip attachment to the MP7 helps with aiming (since it reduces recoil) and the Adjustable Stock lets you move faster when you are aiming down the sights which helps avoid enemy fire in combat.