Going on the data available to me via the wiki...
It is more efficient in terms of overall resources spent to level up your farms at the same rate.
The level 1 farm costs 20 of each resource for an increase of 1 (in terms of food production - it's producing 2 food, but that's only 1 improved over the previous level).
The level 2 farm likewise costs 36 of each resource, and increases the yield by 2.
So you can either spend 20 + 36 == 56 for a level 2 farm for a grand total of 3 increased food per hour, our you can spend 20 + 20 == 40 for two level 1 farms and 2 increased food per hour.
56 / 3 = 18.67 resources / food vs.
40 / 2 = 20 resources / food.
At this point, diminishing returns have yet to set in -- it's worth it to get all of your buildings up to level 2 ASAP, as they provide a better return on your investment.
However, if we carry on the math--
A level 3 farm costs 20 + 36 + 64 = 120 resources, the same as upgrading 6 farms to level 1.
Level 3 Farm = +6 increased food / hour
6 level 1 Farms = +6 increased food / hour. At this point, you get the exact same return no matter how you spend your resources. But if we carry the math one step further...
Level 4 Farm = 120+112 == 212 Resources and 11 increase in food / hour = 19.27 resources / food
If we spend those same 212 resources on 3 level 2 farms, and 2 level 1 farms, we get
208 Resources and 11 increase in food / hour = 18.91 resources / food
It's slight, but by this point, you've gained the same bonus for slightly less resources than if you had focused on leveling a single building.
Keep all your buildings as near in level as you are able for the best efficiency.