Let me give you some info on this:
Pistols are basically secondary weapons, which essentially mean they are used after your primary expires but this does not mean they cant be used more frequently. Pistols are lighter so they improve your agility.ie.. you tend to move quicker. A combination of good strafe techniques and a powerful weapon like nighthawk or even the default CT pistol .45ACP can be ver lethal even against snipers or other rifles. Glocks(t default) are known for exceptionally low recoils..which makes them very accurate. i hope that answers your question.
Knife my favourite is a melee weapon , which means it needs to be used when you are in very close range where pointing your smgs and rifles at the target will be difficult. You need to simply slash arround with your knife and the opponent gets injured. Expert knifers can kill in one shot. Some players also use it in combination with smoke grenades. Since its hard to see in the smoke you keep slashing, some one comes he is cut open. Other like me take pleasure in stabbing from behind..
Hope it was helpful..