Beryllium is in Group 2A or 2, so the charge of its ion is +2. Chlorine is in Group 7A or 17, so the charge of its ion is �? typical in all ionic compounds of the halogens.
Be2+, Cl�?/SUP>
You want the overall charge to be zero, so the charges of how many beryllium ions plus the charges of how many chloride ions add up to zero? You want the lowest whole numbers of each ion. Well, one beryllium ion plus two chloride ions has a total positive charge of +2 and total negative charge of �?, so that will be it, BeCl2.
Steve