Virtually all shops are closed on Sunday and on public holidays. You should check if there is a public holiday during your stay in Vienna to avoid surprises.
Grocery stores in Vienna usually open at 7.30 or 8 am and close at 7 or 8 pm(19h/20h). Bakeries open even earlier, some as early as 6am. Other kinds of shops may open at 9, more rarely at 10am. Shops in general also close earlier on Saturdays.
So what to do if you have an emergency on a Sunday or holiday? There is one grocery store open in each train station and at the airport. You will also find bakeries and other food shops open those days in these places. If you arrive on such a day it may be wise to do some petty shopping at the station or airport before heading to your accommodation.
Museums, palaces and other attractions are unaffected by Sundays and holidays, but they do have some closing days that vary, so it is always a good idea to check beforehand.