Money and priorities.
GDP per capita in Singapore is $65000. In Malaysia it is $11500. There is simply more money being produced in Singapore to pay for naval and air force equipment.
Moreover, while Malaysia has a extensive coast, it doesn't have the almost unique position of Singapore as a country whose prosperity is almost entirely derived from trade with passing ships. Therefore protecting shipping, and defending their waters is a greater priority for Singapore.
Finally the Singapore navy is much smaller than the Malaysian Navy, with around half the number of personnel, and fewer vessels. Thus Singapore can afford to equip those vessels better. Malaysia needs more boats, to patrol its long coast, but this comes at a cost.