While the booming blade and blade with green flame Cantrips are the most obvious spell-assisted melee weapon attack options, this type of improvement is not limited to melee attacks. The spells listed below only rotate at a distance. There are other spells that apply to both, but I have focused on those that require distance.
Here are some examples, but more exist if you look at the spell descriptions in the different source books.
Magic stone (EEPC, 160) is the most obvious option here:
You touch one to three pebbles and imbue them with magic. You or someone else can launch a ranged attack with one of the pebbles by throwing it or launching it with a slingshot. If launched, it has a range of 60 feet. If someone else attacks with the pebble, that attacker adds your spellcasting modifier, not that of the attacker, to the attack roll. On a hit, the target takes bludgeoning damage equal to 1d6 + your spell casting ability modifier. Hit or miss, the spell ends on the stone.
If you use your spell locations, you have other options. Ranger's spell list contains many examples:
Lightning arrow (PHB, 255):
The next time you make a ranged attack with a weapon for the duration of the spell, the ammunition of the weapon, or the weapon itself if it is a thrown weapon turns into a lightning bolt. Make the attack roll as usual. The target takes 4d8 lightning damage on a hit, or half the damage on a missed shot, instead of the normal weapon damage.
Flame arrows (EEPC, 156):
You hit a quiver containing arrows or bolts. When a target is hit by a ranged attack with ammunition taken from the quiver, the target takes 1d6 additional fire damage. The magic of the spell ends on the piece of ammunition when it hits or misses, and the spell ends when twelve pieces of ammunition have been taken from the quiver.