A good UU Pokémon. It walls the hell out of Meganium (don't Sludge Bomb before you check for Counter though), can paralyze opponents or put them to sleep, supports with Aromatherapy and Leech Seed or sweeps with SunnyBeam. Like many other Grass- and Poison-types, however, it gets walled very easily, both in UU and in standard. Still, a good counter to Electric-, Grass-, Water-, and Fighting-types, depending on EVs.
Vileplume should only be used outside of UU with the Aromatherapy set, otherwise special versions are inferior to Exeggutor, and physical versions wish they could be Victreebel.
This set is useful in UU play only, Exeggutor outclasses this in OU.
Try to bring in Vileplume on something that doesn't do much damage to it, and is likely going to switch out. Start disabling your counters by wearing them down with Hidden Power or putting one of them to Sleep with Sleep Powder. You will likely want to wait with using Sunny Day when you can OHKO most things your opponent has left, or if you can beat them one on one without dying the process. When the time is right, use Sunny Day to double speed, power up Hidden Power Fire and turn SolarBeam into a one-turn attack. Hidden Power Fire gets rid of Steels like Metagross and Skarmory in two shots, Salamence will nearly always die to one Hidden Power Ice. In UU play, SolarBeam already puts a big dent in Gligar (the only thing really worth using Hidden Power Ice for), so you'll probably want to use Hidden Power Fire for other Grassers like Meganium.
Paralysis negates your speed boost, making sweeping practically impossible, so that's why Lum Berry is an option. Leftovers is generally the better choice though, because it often means difference between life and death.
In standard, this set has no chance at all, and in UU it will be too easy to resist by Gligar. If anywhere you should use this set against ubers when paired with Groudon, but then it's just a worse Victreebel. If you're doing that, put SolarBeam in the last moveslot.
Despite Sludge Bomb being a very cool move, Poison is one of the worst attacking types in the game. In addition, Vileplume is slow and its Attack is only average.
Either way, the idea is to find some place to Swords Dance—preferably against a Water or a fellow Grasser-and then attack away, using Moonlight when needed. You can try to put one counter to Sleep with Sleep Powder. Moonlight is replaceable for another attacking move. Hidden Power Fighting has a chance to OHKO Aggron after a Swords Dance, Hidden Power Ground helps for Metagross and still puts a dent in Tyranitar if you're using this in OU. Then you could use a Grass move (Razor Leaf, Giga Drain or Hidden Power Grass) for Grounds like Sandslash, Quagsire, and again, Tyranitar.
Utility Vileplume, probably one of your best bets in both UU and standard if you're looking for a more sturdy Electric or Grasser counter. Works a bit like Venusaur, but with Aromatherapy. Leech Seed works well with Spikes and helps your team, and Moonlight keeps Vileplume alive as long as Sand Stream isn't raging. While it doesn't do much damage, this set makes a great supporter.
Make sure to use a nature that reduces the attacking stat you're not using. An alternative way of EVing this Vileplume are shifting Special Defense to Defense and using Impish or Bold, depending on which attacking stat you're not using. Stacking the attacking stat isn't a bad idea either, especially if you're running Sludge Bomb, as Hidden Power Grass is mostly for things that are already weak to Grass, like Walrein and Quagsire.
Stun Spore is cool if you can catch some fast Flier like Fearow or Salamence on the switch. Toxic is another status affliction Vileplume can deal out; it'll ruin Hypno, who relies on Wish to recover. It works wonders on Milotic and Suicune in standard too, the former losing stall potential, the latter being forced to Rest. Hidden Power Ghost is an alternative physical attack for Swords Dancing Vileplume.
On the Sunny Day set, since it should only be used in UU, you don't need to worry about being faster than threats like Aerodactyl and Jolteon, so you have a few options here. You can opt to be faster than Electrode (which rarely, if ever, uses a +Speed nature, and it's already rare to begin with), which requires a stat of 190 before Sunny Day (giving 380 after), or 216 EVs. The next breakpoint would be +Speed Persian and Sneasel (also rare) which needs 180 EVs to get a stat of 181. The slowest you should go would be 136 Speed EVs, giving a stat of 170, as this is faster than Timid Manectric and Electabuzz after Sunny Day. Whatever you decide, max out Special Attack with Modest, and put the rest into HP or a defense.
On the sweeping sets, you should max the attacking stat you're using, as suggested. The last set should always have max HP, and be mostly focused on one of the defenses.
Checks and Counters
In standard, without Hidden Power Fire, Metagross, Forretress, Skarmory and other Steels laugh at Vileplume, except if they get Sleep Powdered. Heracross doesn't take much from anything Vileplume does, even Hidden Power Fire. Guts makes it ideal to absorb Stun Spore, and if it has Sleep Talk, then Sleep Powder as well. Dodrio, Salamence, Gyarados and other Fliers hit Vileplume hard with STAB Flying moves, but do not enjoy Stun Spore (due to the speed loss) or Sludge Bomb (because of poison chance and damage). Hidden Power Ice surprises some Fliers pretty well, too.
In UU, Muk walls anything Vileplume throws at it, even the Sunnybeam set doesn't do much damage, and if Muk has Fire Blast Vileplume will be dead in two hits. Fearow hates Stun Spore, Hidden Power Ice and Sludge Bomb, but can come in on a Grass move easily and use Choice Banded Drill Peck, which OHKOs Vileplume. Sets without Sludge Bomb or Hidden Power Ice / Fire will get walled by Jumpluff and other Grassers, while any set without a Grass attack has some trouble with Waters with Ice Beam as well as Ground-types. Without Hidden Power Fire, Vileplume is a sitting duck against any Steel.