For a toddler? no.
I would argue even as the child gets older it is not an effective discipline tool. Whenever I discipline my child I ask: What is he learning from this? I believe discipline should be about teaching them how to make the right choice next time. Grounding and time out doesn't teach that. Heck even jail has been shown to make people actually WORSE. Isolation is not something we should be doing to our children.
For example, when I was younger and threw temper tantrums my mom would yell at me, and put me into my room. Pretty normal yes? And although it did end up working, I did eventually stop throwing them, it didn't work in every aspect.
Now when I am mad or frustrated, I find that my first instinct is to want to yell. So although she stopped the behaviour, it still caused long term effects. Especially because we don't tend to see yelling at our children as "bad," when in reality it causes a lot of long term issues. I think as parents its important to ask ourselves: is this just dealing with the behaviour, or is this dealing with the underlying problem?
Many parents are quick to discipline a tempered toddler for stomping and hitting. When the real problem isn't either of those things, its a lack of emotional control. Emotional control is not something that will be taught through punishment, it is something that must be taught from the parents.