In Kelantan and Terengganu, Malay-owned establishments are by law not allowed to deal in alcohol, and Muslims caught drinking will be caned and fined.
These laws do not apply to non-Muslims, so Chinese and Indian shops may legally stock beer and spirits, but their stocks will often not be on public display and prices tend to be high. On the resort islands in particular, you'll be looking at upwards of RM 10 for a can of beer, so stock up before arrival. One notable exception is Tioman which is a duty-free island.