It is perfectly ok to eat some sugar.
Sugar has been highly researched over the years and studies conclude it remains safe to eat. It’s all a matter of balance, avoiding excess and consuming foods and drinks primarily from the recommended core food groups. As long as you don’t overdo it, sugar, like anything else, is not harmful.