In 5e a lot of the spells in both the Monster Manual and PHB talk about a spell being a “melee spell attack”. Is this simply to do with the range of the spell or are there additional rules to rolling?
The reason I’m slightly confused is because the cantrip Thorn Whip says to make a melee spell attack against a foe, but it has a range of 30.
A melee spell attack follows all the rules of a traditional melee attack. The applicable rules are on page 195/205 of the PHB or 73/81 in the Basic Rules pdf.
Most creatures have a 5-foot reach and can thus attack targets within 5 feet of them when making a melee attack. Certain creatures (typically those larger than Medium) have melee attacks with a greater reach than 5 feet, as noted in their descriptions.
In this case, thorn whip attacks like a melee weapon with 30-foot reach.
The difference between a melee attack and ranged attack is that a ranged attack suffers disadvantage if you’re within 5 feet of an enemy while a melee attack is not affected.
In addition, a melee spell attack like a ranged spell attack uses your spell attack modifier (spellcasting ability + proficiency).