The 7s and 8s refer to the number of syllables in each line of the hymn. CM, LM & SM are just shorthand ways of saying some of the more common ones. D means double (i.e repeat everything).So 8.7.8.7D would be an eight line verse with alternate lines of 8 and 7 syllables. "While Shepherds Watched" would be 8.6.8.6 (which is probably CM or SM).
Note that the tunes may contain more (or occasionally fewer) notes than there are syllables in the poem - Alleluia is only four syllables, but can be many more notes than that.
WassaiL! V