If I had to pick only two functions for the government to do, I'd pick protection for both.
1) Police protection from each other: gangs, etc.
2) Protection of the environment.
People love to talk about market forces solving all problems, but protecting the environment is something that market forces do a very poor job at protecting. See global warming on a global scale, or overfishing, it's the economic principle of externalities - also referred to as "the tragedy of the commons".