Each party in the Senate has their own rules in determining committee assignments and appointments of the top member on committees. The Democrats rely largely on seniority in appointing committee leadership.
Democratic senators also voted to reject a six-year limit on committee leadership posts, preserving the caucus’s long-standing seniority system, while also placing restrictions on the committee postings for the top two leaders, the officials said.
Bernie Sanders has served as the ranking member1 (i.e. top Democrat) on the Senate Budget Committee since 2015. As the Democrats took control of the Senate this week, he will become the chairman of the committee.
With regards to how Sanders became the ranking member on the Budget Committee, from The Hill:
In one of the more interesting moves, Sen. Bernie Sanders (I-Vt.) will become the ranking member on the Senate Budget Committee.
Sanders is moving into the slot because Sen. Patty Murray (D-Wash.) opted to take top Democrat's job on the Senate Health, Education, Labor and Pensions (HELP) Committee.
1Defined on the Senate's website as "The highest ranking (and usually longest serving) minority member of a committee or subcommittee."