It depends on how you want to handle it - you could do it quite quickly with sprites.
Firstly, position an object at the light source, hidden, that's assuming your light source isn't already an object that you can use. You need to calculate the screen position of the light source, then the middle of the screen. Now you have the 2 coordinates, work out the 'insert complicated maths term' using x1-x2 and y1-y2, so you get the difference between them. Now, you can use this difference and multiply it between 0.0 and 2.0 to get the locations of your lens flare sprites.
So:
Position the object at the light source.
Store the screen location (if it's in the screen). [scx#,scy#]
Calculate the centre of the screen. [midx#,midy#]
Calculate the difference. [dx#,dy#]
Then, using something like:
img=1
spriteno=1
For step#=0.2 to 1.8 step 0.4
Sprite spriteno,midx#+(dx#*step#),midy#+(dy#*step#),img
inc spriteno,1
inc img,1
next step#
Now, doing this with plains is a little more tricky, because you need 3 dimensions, but if you calculate the light source XYZ location and the camera location, you can get the differences in the same way, and multiply them in the same way to get the lens positions. You would have to scale the plains so they were the right size, but no doubt there is an easier way to do it in 3D that I haven't figured out.
Van-B
My cats breath smells of cat food.