It's close to the exact same as for 3D. If you aren't familiar with 3D graphics programming (including forward lighting, deferred shadong, normal mapping, and shadow mapping) then you should step back and study those topics first. They're all fairly easy; I'd argue that normal mapping is the hardest simply because you have to deal with tangent and binormal basis conversions, but they're just basic linear algebra.
From there, you need to do a few tweaks and simplifications to the algorithms. Assuming you aren't just using a full 3D engine will bill-boarded sprites, that is. First of course is to move from a 3D projection to a 2D projection (simulated using an orthographic projection matrix in a 3D stack combined with keeping all your objects locked in the XY place and oriented toward the positive Z axis). Basic 2D rendering stuff, nothing special at all, but with those 3D lighting algorithms applied in your shaders.
From there, you have a couple small tweaks to make. The most important is your light source location. If your lights are in the XY plane and your objects are in the XY plane and oriented perpendicular to that plane, the lights are going to look "weak". The lighting will look like you laid a flashlight on a table and are trying to light up pages of a book also laying on the same table. The tweak to make then is to simply move the light outward some distance; the distance chosen will need experimentation to find a nice looking value.
For shadowing, the change is to switch from a 2D shadow map to a 1D shadow map. For regular shadow mapping, you project a 3D light source location and direction onto one (or 6, for cube mapping) 2D shadow plane. In 2D lighting, you project a 2D position and direction (just an angle) onto a 1D shadow line. The line can represent the entire 360 degree circumference of the light's affected circle. The math is very similar; all just basic linear algebra. Once you have the shadow line (which contains distances of shadow-casting objects to the light, with each texel corresponding to a particle angle from the light), when rendering any other fragment in the scene, you need only calculate the distance and angle to the light to read from the shadow line and determine if the fragment is in shadow.
It's worth using deferred lighting in 2D, as scenes will generally have lots of lights that affect only a small portion of the scene. The algorithm is basically the exact same between 2D and 3D, expect you replace the planar shadow map lookup with the linear one.
I've yet to use this algorithm in an actual game, but I did build a nice tech demo that looked alright. I'm fairly sure that replacing my coder-art would have made it looked nice.