The Vendor of Sweets deals with the tensions of modernization in India playing out through the tensions between Jagan and his son Mali. Ambika died long ago from a brain tumor. Her death, it's suggested, was due in part to Jagan's insistence that she use only natural remedies. Mali blames his father for her death and embraces modernization.
The extended flashback to Ambika and Jagan's marriage also suggests he neglected her and that she was unhappy for years, especially before she had a son. Jagan makes clear that he views proper Hindu marriage as a man ruling over his wife. This is how he treats Ambika, and he is frustrated with Mali for straying from this model of relationship when he refuses to rule over his partner, Grace, and doesn't even marry her according to Hindu customs.
Narratively, Ambika serves to flush out Jagan as a character and draw out the tensions between him and Mali. In many ways she represents the harm caused by the kind of traditionalism Jagan embodies and a push towards modernization for her son.