For atom 2: it has 4 single bonds with 4 atoms, no lone pairs, so tetrahedral shape
For atom 4: it has 1 double bond, 2 single bonds, no lone pairs, so trigonal planar
For atom 3: the same as atom 4, trigonal planar
For atom 1: it is bonded to 2 atoms, one single bond and a triple bond with nitrogen, the shape will be linear
In general: to determine the bond shapes you should draw the Lewis diagram for the molecule, or in this case for the atom you are studying. Shape is determined according to VSEPR theory.
1) if there are 2 atoms only in the molecule the shape is linear. (straight line)
2) if there are 3 atoms in the molecule: a) linear if no lone pair of electrons on the central atom
b) bent if there is a lone pair of electrons on the central atom, since the lone pair causes repulsion with the other atoms' electron clouds and push them away (bending)
3) if there are 4 atoms: a) with no lone pair on the central atom, then it is trigonal planar (formaldehyde CH2O)
b) with a lone of electrons, this will cause repulsion and the shape will be tetrahedral, with the lone pair at on corner (vertex) as if it is an atom (NH3)
4) If there are 5 atoms : it is mostly tetrahedral, with an atom in each vertex and one at the center.
There are special cases and exceptions, but this is the simplest method.
Hope I correctly understood your question.
Content will be erased after question is completed.