To use FFP (fixed function pipeline) lighting, you first need to fill in a D3DLIGHT9 structure. The elements are pretty straight-forward. I've found that you need values much greater than 1.0 for the light's color though; somewhere around 300 in R, G, and B for white lights is working well for the moment. After you have the structure filled out, pass it to IDirect3DDevice9::SetLight(). After setting the light information, you need to enable to light as well using IDirect3DDevice9::LightEnable().
To take full advantage of the lighting system, I recommend setting a material as well. To do this, fill out a D3DMATERIAL9 structure. The material describes what components of the incoming light are reflected, and by how much. It also describes how shiny a surface is with the Power element, and how much light the surface is emitting with the Emissive element. Note that the emissive element does not actually act as a D3D light; it only makes it seem like the material is glowing. After the material structure has been filled, pass it to IDirect3DDevice9::SetMaterial(). Now that the actual material is setup, we need to tell Direct3D that the diffuse and specular information is coming from the material and not the vertex buffer. To do this, set the D3DRS_DIFFUSEMATERIALSOURCE and D3DRS_SPECULARMATERIALSOURCE render states to D3DMCS_MATERIAL.
Reposted from http://invisiblegdev.blogspot.com/