These are some suggestions. I do not mean to be insulting by explaining basic things, but I do not know how much camera experience you have. When I first started taking beam shots (which was not all that long ago), I posted a question similar to yours. I would have appreciated a more detailed response, so that is what I am giving here.
1. You need a camera with a manual setting. If you use an automatic setting, the camera will adjust the exposure depending on the brightness of the beam, and the pictures will not present an accurate comparison. If your camera does not have a manaul setting, you can still take beam shots but they will not result in a fair comparison of beams from different flashlights.
2. If you have a camera with a manual setting, read the owner's manual to learn how to adjust the f stop and shutter speed independently of each other, as well as the ISO.
3. You need a tripod. Beam shots generally require taking pictures at slower shutter speeds. You cannot get a picture in focus at a slow shutter speed without a tripod. Also, you want the camera to be in the same position for each shot so the pictures will present a fair comparison of flashlights.
4. A higher f stop gives more depth of field. If depth of field is greater, the background of the photo is in greater focus, as well as the forground. You may want more depth of field in a beam shot photo depending on the target. If your target is two dimentional, like a wall, then you do not need a lot of depth of field. A trade off for more depth of field is that the image is darker at the same shutter speed than an image taken with a lower f stop. Counter-intuitively, a lower f stop means a larger apeture and therefore more light reaches the lens at the same shutter speed.
5. In the manual setting, you can adjust the shutter speed independantly of the f stop. By using a slower shutter speed, you will get bighter beams and your pictures will not be so dark. It is critical that you use the exact same settings for each beam shot so the photos present a fair comparison. If your dimmest beam is too dark, then lower the f stop and/or increase the shutter speed and/or increase the ISO, but use the same settings for all shots. In the manual setting, you can still use automatic focus (so you do not need to focus the lens manually).
6. I use an ISO of 400 for beam shots. A higher ISO results in greater light sensitivity but a grainier picture. If you use a lower ISO, you will need a slower shutter speed for the same brightness of your photos, all else being equal. You can experiment with the ISO setting.
7. Make sure all rechargeable batteries are freshly charged, and all non-rechargeable batteries are being used for the first time.
8. The great thing about a digital camera is that you can experiment easily. Keep trying different settings until you find settings that work well.
9. Take pictures in the dark, with no artificial light source nearby.
10. You also need to think about whether you will take beam shots indoors or outside, whether you want to use a two or three dimentional target, what target you want to use, and how far to place the camera from the target. I find it useful to look at beam shots taken by others to help make those decisions.
These are photos of a Surefire U2, 27LT and HD45 5W XXIT I posted in My Flashlight Collection thread, all at the highest settings
using freshly charged rechargeable batteries.
For these photos I used an ISO of 400, a shutter speed of 1/8, and an f stop of 2.8, at a distance of about thirty feet. If I were to take the photos again, I would try a higher f stop and slower shutter speed to get greater depth of field. I think trees make good targets. You can judge flood by how the leaves are illuminated at the edges, and throw by the brightness of the leaves at the center. The above beam shots tell me that the U2 has the most flood, the HD 45 has the most light output, and the 27LT is in the middle. Becasue the HD45 has so much more light output, it is hard to judge the relative amount of throw from the HD45 and 27LT from these photos but they appear to me to be pretty close.
Good luck.