One of the functions of the comma is to separate words and word groups in a simple series of three or more items, therefore the commas after 'Langkawi', 'Pangkor', 'Tioman Island', and 'Damai beach in Sarawak' are correct. The words mean exactly as they are read - they are the placenames 'Langkawi', 'Pangkor', 'Tioman Island', and 'Damai beach' (which is in Sarawak) respectively.
The comma that comes after 'and' is incorrect, as there shouldn't be a pause at this point of the sentence.
The comma after 'beach resorts' is also incorrect as our list of items hasn't begun yet. As we introducing a series of items, a colon (:) should be used. For example:
- One needs the following items to bake a cake: butter, sugar, and
Effectively a colon can be interpreted as 'that is to say' or 'here's what I mean.
Therefore the correct punctuation for that sentence (in my opinion) should be:
Malaysia is famous for its pleasant beach resorts: Langkawi, Pangkor,
Tioman Island, Damai beach in Sarawak, and again, Penang.
There's a nice outline of the different types of punctuation here, which may be useful.