Levels were added before the badge update. Everybody starts at level 0. The levels help record how much you played and how skilled you are. The amount of XP you get depends on how many sections you complete.
Levels tend to get harder and harder to get as each one requires more wins than the last level. One win is required to get to level one, however you'll need around 4 wins to get to level 2-3 (although the amount of XP you get depends on the length of the tower, the first win is guaranteed to get you to level 1).
You get 1 skill point per level (you were able to get multiple per level before the skill tree was updated). Although there is no max level, you will only need 80 levels/skill points in order to max your skill tree.
The color of your XP bar is randomly generated depending on your ingame user id.