Technically you can't do it from the periodic table except by estimation. For example, let's take C. We look at the periodic table and see the atomic mass is 12.011. Remembering that atomic masses are AVERAGES of all of the isotopes, that tells us that PROBABLY one of the isotopes is C12 and another one MIGHT be C13 or C14.
#protons + #neutrons = mass number
6p + ?n = 12; therefore, ?n = 6
For C13, that would be
6p + ?n = 13; therefore, ?n = 7.
For Li, atomic mass = 6.941. That leads us to believe that one of the isotopes has a mass number of 7, then
3p + ?n = 7; therefore, ?n = 4, etc.
By using the periodic table we can make some educated guesses as to the mass number of one or more of the isotopes and after we know the mass number the number of neutrons follows.