Answer - yes. It's as safe as what you eat at home, maybe safer. If the legislature hasn't cut staff levels at the Health Department, all food concessionaires are required to fill rather exact standards for preparation and service. Each concessionaire is inspected before they may open. Now, you have to watch out if you're on a restricted diet.
Cotton candy is pure sugar.
Popcorn is popped in a variety of oils which may not be healthy. The oils are probably hydrogenated, a process that increases the bad cholesterol. Add a heavy dose of salt and look out. Everybody goes by the health department's golden rule of thumb - hot things hot, cold things cold. The wise event-goer should stand and watch the preparation and decide for themselves whether to eat or not.