You will be receiving your entry stamp from Bangkok. The only way you could receive a Samui stamp is if your flight was arriving directly into Samui from Singapore or one of the few other cities which have international flights to Samui.
Firstly, Singaporean or Malaysian immigration might be suspicious of why you would leave as soon as you entered. If you're staying for a full day, that's fine but not if you're turning around as soon as you entered.
Secondly, Thai immigration doesn't take kindly to same day air border runs. Each individual will have different experiences, but I've heard a lot of horror stories.
Land based runs are better. Especially if you use a service, which brings you across and back.