If you supply food on an occasional and small-scale basis, it is unlikely you will need to register as a food business. You may need to register with your local authority as a food business if you provide food on a regular and organised basis. Food Standards Scotland has produced this advice for new businesses.
If you make or sell food for charity events and you do not need to register your community building as a food business, you should still make sure that you are aware of how to handle food safely.