At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
The best way to identify the shape of any molecule like this is to use the Lewis Bond Theory and the VSEPR (Valence Shell Electron Pair Repulsion) Theory. The first of these can be used to designate the distribution of the valence electrons of each of the atoms present, with these electrons either being shared with other atoms to form bonds, or being localised on a certain atom to form a lone pair. The main goal is to distribute the electrons in the molecule so that each atom has a full octet (full outer shell), or as close as possible to this. We can then use VSEPR Theory to predict how these electrons will repel each other to different extents around the central atom, depending on whether they are in lone pairs on an atom, or as bonding pairs, shared between two atoms. I'm not going to give a full-blown description of everything involved with these two theories, as that would take quite a while! I'm going to have to assume that you have at least heard of some of the methods and terms I'm going to use here before. Don't worry though, there's plenty of really good websites and YouTube videos online covering the topic and with their own descriptions of how it's done - I'm just going to give mine in relation to this particular question. It's a topic which is very dependent on the molecule we're looking at, but the more questions you do and the more examples you meet, the better you will become. So, here we go.....
Lewis Bond Theory: This is probably the most complicated of the two steps we need to take in order to answer the question, but initially we just need to follow a few simple steps. We're trying to distribute the valence electrons of each of the atoms present in BeCl2 so that each atom is ideally 'surrounded' by eight electrons. When distributing these electrons, we consider them in pairs, but the first thing we need to do is find out how many we have overall. So, Beryllium (Be) has two valence electrons in its outer shell. An easy way to remember this is that it is in Group 2 of the Periodic Table. Chlorine (Cl) is in Group 17 of the Table, which is also sometimes called Group 7. That's because all of the atoms contain 7 electrons in their outer shell (valence shell). So, for BeCl2, we have 1 Be atom and 2 Cl atoms, meaning that we have 2 + 7 + 7 = 16 valence electrons, overall, to distribute. To make this easier, we will pair these electrons up, meaning that we have 8 electron pairs to distribute. So, let's try and do just that! Initially, we need to find the central atom in the molecule. You could probably have guessed that this will be the Beryllium, as it kind of makes sense. In general, the 'central' atom will be the one with the most number of available bonding sites in it's valence shell. To put it in another way, it will be the least electronegative of all the atoms present, excluding any Hydrogens. |dw:1435610576895:dw| Remember, we're not deciding on the shape of the molecule here, just how the electrons are distributed.
very well explained @Ciarán95
The first thing to do is to place two of the electron pairs between the atoms as so: |dw:1435610899425:dw| Each of the Cl atoms must be bonded to the central Be by at least a single covalent bond, meaning that there must be at least one pair of electrons shared between the two atoms in each case. That leaves us with 6 electron pairs left to distribute.... We'll now move on to trying to fill the octet of the other atoms in the molecule, typically starting with those surrounding the central atom (Be). There are two Chlorine atoms, and if we assign three electron pairs to each individually we get: |dw:1435611246005:dw| Each pair of dots represents a pair of electrons (I should have remembered to say this earlier!) and so each Chlorine now has three lone pairs assigned (6 electrons). There's also the electron pair it's sharing with the Beryllium, making 8 electrons, or a full octet, in its outer shell. This is the 'magic number' that many atoms want to get to when bonding, apart from Hydrogen, whose outer shell is full with just two. This wouldn't be Chemistry though without exceptions, so this doesn't hold for some atoms, which can exist in molecules surrounded by less that 8 electrons or more than 8 electrons. If we look at Be in the above structure, its outer shell has just four electrons, from the two electron pairs it shares with the two Chlorine atoms. This means that it is has not got a full octet present, but as we discussed earlier, exceptions do exist and Beryllium is one of those. We know that this is the most stable electron distribution by looking at what is called the Formal Charges on each atom on the molecule. This is nothing to do with any overall charge on the molecule, but rather the difference between the number of a valence electrons a certain atom has and the number of electrons 'associated' with it in the Lewis bonding structure for a given molecule. Formal Charge = (No. valence e-) - (No. of e- in lone pairs for the atom) - 1/2(No. of e- in bond pairs for the atom) Essentially, we assign these values to each of the types of atoms in our BeCl2 in our Lewis structure: Cl: 7 - 6 -1/2(2) = 0 Be: 2 - 0 - 1/2(4) = 0 The most stable structure is the one in which the Formal Charges of the atoms are as close to 0 as possible, with any negative Formal Charges (if they can't be eliminated by rearranging the electrons) preferentially existing on the most electronegative atoms. We can rearrange the electron pairs to give Be a full octet, as so: |dw:1435632590116:dw| Here, we've moved one electron lone pair from each of the Chlorines and shared it with the Beryllium. So, each Cl still has a full octet and now so has Be, via the 4 bonding pairs of electrons around it. However, if we were to look at the Formal Charges for each of the atoms now, we could find that each Cl has a charge of +1 and the Be a charge of -2. This is worse than our original structure, meaning that we must have been right first time around (i.e. Beryllium does not obey the octet rule). In a lot of cases, when we arrange the electron pairs such that each atom has a full outer shell of electrons, we end up with the most stable structure with the lowest Formal Charges, but this is just an exception to the rule.
VSEPR Theory: Now that we've established our rather tricky Lewis Structure and distributed our valence electron pairs in the most appropriate way in the molecule, we can now start to consider how it will appear in three dimensions. We do this by looking at the outer shell of electrons surrounding the central atom, in this case Beryllium (Be). It's these which we will use in order to decide how our molecule looks. Again, I'm only going to focus on this specific example and the BeCl2 molecule in question, but it's important when attempting this to have a good understanding of all the possible shapes/rearrangements we could possibly end up with. The more times you meet these and the more examples you do, the more familiar you will get with them. https://figures.boundless.com/10397/full/vsepr-geometries.png The theory we're going to use is based on the fact that these outer shell of electron pairs are all negatively charged and thus will all want to repel each other (like charges repel). However, depending on whether these electron pairs are lone pairs or bond pairs will affect the degree of their repulsion. As a general rule of the repulsion strength between electron pairs and their interactions: Lone Pair/Lone Pair (Interaction) > Lone Pair/Bond Pair > Bond Pair/Bond Pair Taking the outer shell of Be in BeCl2, the 2 electron pairs present are each existing as bonding pairs, being shared with the two Cl atoms respectively to form two single covalent bonds to them. So, we can only have one type of interaction, and that is between these two (Bond Pair/Bond Pair). As there are no lone pairs on Beryllium, there is no other type of repulsion interaction which can 'overpower' than between the two bond pairs, which want to be as far apart from one another in space in order to achieve the most stable structure. They can do so by forming a Linear arrangement (see the link above to the chart), in which all the atoms are essentially lying in a straight line and the bond angle between Be and each Cl is 180 degrees. |dw:1435634446393:dw| And that's it!...our question has been answered. It quite long in theory, but in practice it can get easier over time, particularly in relation to the Lewis Structures and how to arrange the electron pairs. There's a few other little rules which can crop up in relation to these structures depending on what molecule you're dealing with (e.g. Resonance), but this is only usually in much trickier examples. In any case, they main method and steps we've gone through here still holds for pretty much all examples you'll meet. Anyway, hope that help you out a bit! :)