I have raided as an elemental shaman since late Wrath of the Lich King. The information I'm about to present is, in its entirety, acquired through experience, making mistakes and learning from them, and use of common sense. I'm not much of a mathematician, so if you are looking for accurate numbers and calculations, you should turn towards another source of information, such as Mr. Robot.
Elemental shaman is an interesting and active caster with a bunch of options to make influential changes to your playstyle. Playing effectively as an elemental shaman consists of maintaining one damage-over-time spell, keeping track of totems, dealing with short duration cooldowns and filling that relatively bursty rotation with some lightning.
Single target damage
As an elemental shaman, always cast Lightning Shield on yourself and self-enchant your weapon with Flametongue.
Elemental Blast: If you did like me and chose this talent, you should use it as often as possible. It doesn't only hit hard, but also increases your critical strike, haste or mastery rating by 3500 for 8 seconds. Ideally you would hope for haste with mastery as your second best option, but extra crit doesn't hurt you either. Elemental Blast will be your third most damage dealing ability. The major downside of this talent is that the numbers are solid: the worse your gear is, the greater the benefit is, which makes the talent particularly powerful for a shaman that is new to level 90, and less effective for a shaman with raid level gear.
Flame Shock: Your only damage-over-time spell and an extremely important tool when dealing damage to your foes. Whatever you cast after Elemental Blast benefits from the stat boost, which is why you should take as much advantage of it as possible, also by casting Flame Shock afterwards. Always keep Flame Shock active and refreshing a second or two before the last tick. If you have the option to cast Flame Shock on multiple targets that aren't going to die within a few seconds, do it. It will increase the amount of your Lava Surge procs, thus increasing your single target damage.
Lava Burst: What you will do the majority of your damage with. Lava Burst is guaranteed to crit when Flame Shock is active. Cast it as often as possible, and keep in mind that Lava Surge procs make Lava Burst instant, which allows you a moment to move without a loss of DPS time, should you need it.
Lightning Bolt: While Lightning Bolt's importance in an elemental shaman's rotation has constantly decreased, often referred to as a "filler spell", its power shouldn't be underestimated, as it will be responsible for dealing the second most damage of all of your abilities. Cast it when none of the other abilities are available, excluding Earth Shock and Unleash Elements in their own ways (see below for explanation).
Earth Shock: While dealing damage with Lightning Bolt or Chain Lightning, you will eventually gain up to seven stacks of Lightning Shield. You should unleash the offensive power of those charges somewhere between five (5) to seven (7) stacks, whatever fits the global cooldown of your shocking best, but make sure not to keep a fully charged Lightning Shield up.
Unleash Elements: Unless you have chosen Unleashed Fury as your level 90 talent, cast Unleash Elements before Lava Burst only when you need to move or need a little bit of extra burst in a short time. If you chose Unleashed Fury, cast Unleash Elements as often as possible, preferably when you know you will be using Lightning Bolt a lot.
Searing Totem: You should have Searing Totem up constantly while damaging a single target, unless you can use Fire Elemental Totem.
Note: This is how I AoE as an elemental shaman and without Glyph of Chain Lightning. I am sure there are differing opinions, but after crawling through a lot of different techniques, I noticed this one having the highest damage output.
Elemental Blast: As with single target damage, you want to get the stat boost from Elemental Blast for AoE as well.
Flame Shock: The idea is to cast Flame Shock on as many targets as possible. It will be more beneficial to cast and refresh Flame Shocks than it would be to use the cooldowns on Earth Shock.
Lava Burst: A critting (guaranteed with Flame Shock) Lava Burst hurts more than a Chain Lightning that hits three targets. With a lot of Flame Shocks active, there will be a lot of Lava Surge procs, which allows you to cast a lot of Lava Bursts.
Chain Lightning: For when Elemental Blast or Lava Burst are not available, or there is no need to recast/refresh Flame Shock.
Magma Totem: Magma Totem deals more damage to two (2) or more targets.
Fire Elemental Totem: Fire elementals do occasional AoE damage as you do it.
Ascendance: Before activating Ascendance, make sure you have just refreshed Flame Shock and cast Elemental Blast and Lava Burst, and you have not procced Lava Surge. Also make sure you have used all global cooldowns, such as Stormlash Totem or Heroism before Ascendance.
Heroism: Your best known raid-wide cooldown. It's preferable to agree with your raid leader when to use Heroism in each encounter, if its use lies on your shoulders. If you use it for yourself, it's best to use Heroism together with other cooldowns for maximum benefit.
The following macro makes you unable to cast Heroism out of combat, thus saving you from unfortunate accidents.
Stormlash Totem: Best used together with Heroism, as they both benefit the entire party. If you use it for yourself, combine it with other cooldowns for maximum benefit. Elementals do not benefit from Stormlash Totem.
Fire Elemental Totem: Your fire elemental benefits from any short term stat increases such as trinkets, Elemental Blast and potions, so the ideal time to use this cooldown is when you have such effects, preferably during Heroism as well. As elementals are on a five (5) minute cooldown, you probably won't get to use them more than a maximum of two times in an encounter.
Earth Elemental Totem: Doesn't provide a major damage increase. Also doesn't taunt raid bosses, so it doesn't hurt to use it during raid encounters. As with the fire counterpart, benefits from short term stat increases. Note that you cannot use both earth and fire elemental at the same time, but they do not share cooldown, so you can use one after another.
Elemental Mastery: The level 60 talent Elemental Mastery is best used together with Ascendance for maximum benefit of the latter, with any possible 2+ minute trinket cooldowns.
Ancestral Swiftness: The level 60 talent Ancestral Swiftness should be used as often as possible, preferably before Elemental Blast or Lava Burst.
Solar Beam (Symbiosis): The druid ability Symbiosis grants elemental shamans their silence, Solar Beam, and the druid either Purge, Feral Spirit or Spiritwalker's Grace depending on their specialization. You cannot use Solar Beam to silence raid bosses, but casting it while they are casting a spell interrupts the cast (for example the Spirit Kings of Mogu'shan Vaults).
Wind Shear: The following macro makes you stop casting any other spell when casting your interrupt spell Wind Shear:
#showtooltip Wind ShearThe following macro makes you Wind Shear a "focus interrupt." If you have /focused on something, and your current target isn't casting, Wind Shear will interrupt your focus instead. If your target is casting, it will interrupt your target.
/cast Wind Shear
#showtooltip Wind Shear
/cast [target=focus , exists] Wind Shear
/cast Wind Shear
As always, any suggestions, corrections and questions are most welcome.