In the early days of SEO it would be hard to find someone who disagree that .edu and .gov websites pass stronger link juice. It’s unclear how much of an actual Google-manipulated signal bump these top-level-domains received, but it was enough to encourage the SEO industry to recommend getting these backlinks. It seemed for a while, not a single article or post about backlinking excluded the tip to get more .Ede and .Gov sites.
Google’s algorithm has matured. Today I don’t believe there’s a specific bias in favor of any TLD (top-level-domain), be it a .com or a .org or any of the newer generics ICANN is rolling out. There are some that Google tends to shy away from, like the usually spammed co.cc domains (sometimes they’re out of the index, sometimes they’re in).
So why no inherent, hard-coded bias? That’s lazy. Plus, it’s possible to game. For instance, most colleges give students their own webspace these days, all with an .edu top-level-domain. Since they can be poor or rented pages, Google wouldn’t want to give them an exception.
I wouldn’t turn my back on an .edu or .gov backlink, but I don’t think they’re stronger by default (anymore).
Even though I don’t think there’s an inherent value, these are still usually good domains because of the content on them. Many schools and government sites host scholarly or legal documents. Many other sites link to these documents fueling up their domain. A link that passes some of that domain authority back to you could be very beneficial for this reason. If it’s a small college with very few links, a low domain authority, low content, and I’d only be appearing on deep pages through a “approved vendors” page, I wouldn’t prioritize this link very high.