Could eating sugary foods cause acne?

No. The link between diet and acne is weak, the strongest being with dairy as a cause and even this is soft. If you have to ask, you should be taking advantage of what real science can offer for prophylaxis. Topical benzoyl peroxide 5% once a day to prevent, or 2x/day to treat; if not clear after this, your personal physician has many options.