I've organized a couple of in person hackathons. For in person, sponsors generally provide either $ to cover food/drinks/space, or they cover a sponsor prize track. For an online hacakthon, I'd assume the former isn't a concern. So, mainly you should figure out what size sponsorship tiers make sense for the scale of your hackathon e.g. $500, $1k, $5k and then what you can provide the sponsors in return. Then go through your network ideally starting with big companies (they have more money so writing a $5k check is a less big deal to them) where you know someone relatively high up that would benefit from your hackathon. Any company that employs a good amount of software engineers is a good bet because they're always looking to hire more.
(Shameless plug: I'm currently organizing http://hackcincy.com in Cincinnati, OH which is 2 weeks from now.)