For calculating energy of a beam we need to know total number of photons in that beam and wave length or frequency of such photon
Then Energy = (Total no. of photons x planks constant x velocity of light)/ Wave length of each photon og sunlight beam
=(N x 6.62 x 10 -34 x 3x1o8) / wave length( in m) The answer will be in Joule or J
If frequency is given than we can use
frequency = velocity of light / wave length