Is Prasad haraam in Islam?
Can Muslims eat pooja food prepared by Hindus?
Is it permissible for Muslims to eat Prasad?
The element of Shirk is what makes foods offered to deities besides God prohibited to eat and such a food item cannot obviously be consumed by a faithful Muslim. You can politely make your friend understand the religious implication of such an act and the reason you refuse to consume this food. You may ask him to give you other sweets if he wishes that are not offered to any deity. I am sure that your friend will understand your religious sensibility and not offer you this prasad.