This particle adds a note of assertion.
大家都来了，你怎么能不来嘛？ Dàjiā dōu láile, nǐ zěnmé néng bù lái ma?
‘How could you not come as everybody else is already here?’
我们不是朋友吗？不要这个态度嘛。 Wǒmen bú shi péngyou ma? Bú yào zhège tàidù ma.
‘Aren’t we friends? Don’t be like that to me. (Literally “I don’t need this attitude.”)
帮个忙好不好嘛? Bāng ge máng hǎo bù hǎo ma?
‘Could you help me?’
Note how 帮忙 gets split up in this example.
原来是这样，我说嘛。 Yuánlái shi zhèyàng, wǒ shuō ma.
(Colloq.) ‘So it is; just as I said.’
The use of 嘛 in this following example is rather different:
你在干嘛？ Nǐ zài gàn má?
‘What are you doing?’