First, according to the world population clock...
U.S. 310,985,523
World 6,905,774,408
21:59 UTC (EST+5) Mar 14, 2011
Looks like we will be breaking the 7 billion mark soon.
Secondly, I'd like to dispute an earlier statement about 'unsustainable' farming practices in the US Midwest. Those unsustainable farms have been in operation for well over 100 years now, and except for the dust bowl incident, which taught the need for better soil conservation practices, are amongst the most productive farmland in the world today.
Food technology continues to progress, with genetic manipulation, better irrigation practices, smarter use of fertilizers and herbicides/pesticides, introduction of 'crop friendly' insects to manage the harmful pests, etc.
Most of the third world has yet to tap a lot of the technologies utilized by the farmers in industrialized nations. India has only recently begun to radically increase their food production utilizing 'modern' techniques, for example.
I've seen some comments about biodiversity and such. This assumes you need all the creatures in our current ecosystem to produce food, which in fact you do not. Except for bees/pollinators, and a handful of other creatures, the human food supply can be adapted quite easily to 'deal with' the loss of turtles, frogs, etc.
Also, genetically engineered fish, shrimp, etc. can be introduced that are more tolerant to changing climate and ecosystem requirements, and incidentally can also be engineered to provide more protein/substance, etc.
This doesn't even tap the possibilities of 'sea' farming (kelp farms, etc.).
Note that the big limiting factor right now for agriculture is lack of available water, which isn't so much a resource availability problem (@ 67% of the world surface is water) as a cost effectiveness problem (purifying seawater and piping it inland for irrigation, for example). As food supplies become more stressed, the more 'exotic' solutions will become acceptable and necessary.
Global food production is key, so if you have a hard season in one region, others can pick up the slack. Also, utilizing more of the land along the equator will also be key, as a year round growing season may be preferable for many crops to, say, Canada and Russia's shorter growing seasons.
Finally, if you move people onto the mountains and other less useful terrain (where agriculture is more difficult), that frees up a lot of floodplains and such for more food production. Not to mention those underwater cities (SeaLab 2020). Keep in mind you will need to utilize some 'former' deserts for additional food production, utilizing that purified water you are pumping in from the coast.
Energy continues to be an issue, but mostly because the public has 'issues' with several forms of energy production (nuclear power is scary, windmills kill birds, and solar panels take up too much space/destroy the view). As fossil fuels become more scarce, widespread adoption of nuclear and renewable energy will become necessary.
Keep in mind that France leads the world in nuclear energy, with 78.8% of their power coming from nuclear reactors. Add solar panels to every rooftop in France, and you could very easily make up that other 21.2% in renewable energy, and throttle back a few nuclear reactors in the daytime when the solar panels are producing energy.
The nice thing about an interstellar culture is that we can look to other planetary bodies for a ready supply of radioactive fuel for said reactors, even if fusion power never pans out.
The bigger issue is getting 20 billion+ people to remain content on the same planet. This is why Galactic Civilizations has all those morale boosting structures, to keep the citizens content and relatively happy. As automation displaces more jobs, those 20 billion people are going to have a lot of free time on their hands...