hi canonrebel,
though its not a technique i ever used in my my photos, but I took it upon as a challenge to see how it could be done. here's a quick howto (prolly with a lot of details ommitted

)
1. find an image that with 'storm lighting' that is, with heavy cloud cover but sunlight striking various parts. This will give your photograph the most realistic effect (if that is what you are after)
2. take you your lasso tool, and forumulate a sun ray where you would like it to appear on the screen. feather the selection anywhere up to 100 to 200 pixels depending on the scene. Copy & Paste the selection as a layer above the background image.
3. do this for every sunbeam you want in the image.
4. To create your sunbeam effect, select layer options -> screen. tone down below 50% opacity for most realistic effect. i've left it slightly higher in my example so the differences can be seen.
before
after
Keep in mind, this is just a very very very crude mock-up. It took me longer to type this up than to create the image

. It needs a bit more selective erasing/dodging burning etc to create a more realistic effect.
hope that helps.