Go to the leading online marketing forums such as Warrior Forum and you will find tons of people asking this question. A lot of people are skeptical on whether .gov and .edu links are more valuable than the rest. And considering that .gov and .edu websites are not commercial in nature, how are these links worth more.
The answer is in the question! These websites are more valuable because they have no commercial intent. For that reason, they contain high quality content, genuine user participation and a strong backing from their governing body.
For example, look at Stanford University website. There is a reason why the website is a PR 8. All the university students interact with it daily, post quality content, use information in non-commercial ways and provide value.
Research suggests that .Gov and .Edu actually DO get favored more by Google, simply because these prefixes show the presence of an Authority website. Think about it, most of the educational and governmental websites have quality content, a lot of user participation and therefore are weighted much higher by Google.
Go and check any .Gov and .Edu website, and chances are that it is ranked PR 5 or higher, and that the number of pages (and content) on that website is simply astounding.
Now the question is, can you actually get a backlink from these websites. Yes you can, but doing so is time-consuming. A simply way to get a backlink from these websites is to find their blog, read their post and make an educated comment on it. Incude your keywords and website in the HTML tag. But before you do, make sure that the blog is DoFollow.