It is possible for family members and friends to visit a student in the UK whilst they are studying, also for the graduation ceremony. Nationals of most countries are required to have a visa to enter the UK. The category they would apply under is ‘Standard Visitor Visa’. For more details, please see https://www.beds.ac.uk/international/visas/travelling-and-inviting-friends-and-family/
How can I enable my friends and family to visit me while I am in the UK?