Levels in Booga Booga unlock higher tiers in crafting and unlock more of the game. To gain XP to advance levels, you can break things (trees, bushes, etc.) or Kill mobs, or collect Essence. There is a common misconception that you require the same amount of XP to advance a level further each time, but this is false. You start off having to get 5 XP for level 2 and then:
XP requirement increases by 5 every level until level 10 where it reaches 50, then the XP requirement becomes 75 at level 38. At level 83, the XP requirement becomes 90 and at level 94 the XP requirement caps off at 150. This means that you require 6,825 total XP to gain 100 levels A.K.A the current level cap. This means that getting halfway to the level cap would require 3413 XP. This also means that 62 is the "median" level (meaning it's the level where you have closest to half of all XP required to get to the level cap)
The sun icon in the top left corner of the player's screen is the XP amount. It increases by the amount of XP that the object of mob was designated to drop when mined.
A common way that people use to level up is destroying the Old God. If a potential .22 XP per swing is used to destroy the Old God, then it is reasonable to use this method. The god that drops the second most essence is the Wealthy God. Number 3 is the Miserable God, Hateful God, and Lonely God. Gods have a long respawn time but you can always server hop to gain experience more efficiently.
Killing mobs gives you experience, however, although it is a common myth, killing players does not give you experience. All mobs give some experience when killed, some more than others. It can be argued that the Stone Shelly is the most efficient mob to gain experience from, as they respawn every 20-30 seconds and can be killed in one hit with a Magnetite Pickaxe or better. You can also kill a Mammoth, which gives 30 experience.
Cutting down Sun Trees and Feather Bushes
Sun Trees appear on the Sun Island or near the entrance to Underwater Ice Cave with the Old God, making it a little convenient. They drop 1 Essence and the Feather Bush also drops 1 Essence (Essence gives 10 exp). You can find Feather Bushes growing on the Floating Island.
Cutting down the Ancient Tree
To level up more you can cut down the Ancient Tree which drops 1,250 Essence, or around 20-30 levels. This is the most efficient way to gain levels without spending coins. Although the tree takes 2 hours to respawn, you can server hop to more efficiently gain levels.
For some reason a Domestic Boi gives 30 experience when killed. It is possible to abuse this with a lot of iron and leaves. First, find a Lurky Boi you want to get experience from and tame it with a Saddle. Now kill the Domestic Boi and start the cycle all over again. It can be very effective, but the Iron used to make the Saddle may not be worth it.