They can both be valuable from a student perspective; GSoC from my experience is a full time gig during that time.
I don't how many internships Google has but SoC is 1-2k people a year
Google Internships from Google's perspective is people that they may want to hire. Summer of Code the candidates are chosen by the participating organizations so it's a wider range.