I've heard a bunch of taste-related words (scrumptious, delicious, yummmy etc.) used informally to describe someone who's attractive, so it seems that people often slangily associate foodstuffs with sex appeal.
Dictionary.com has an entry for the slang word snacc, and in the etymology, they explain when the original term began to get repurposed:
In the 2000s, snack emerges as slang for an attractive person (i.e., someone who looks sexy enough to scarf down like a snack). This sense of snack is recorded on Urban Dictionary and found on Twitter by 2009.
It's not too complicated as far as etymologies go. As an eloquent Redditer put it, "snacks are yummy. the person looks yummy."
The same idea is expressed in a little more detail on slang.net:
A snack is a person who looks attractive, almost tasty, which makes you want to eat [them] up, much like an actual snack.
Doesn't take a frog to make the leap between the two ideas.