Scientifically, it is the light diffraction over the aperture boundaries that creates the star-burst effect. The smaller the opening the more pronounced the diffraction effect.
You can proceed in the following steps for star-burst effect in photography.
-Set the camera on a tripod or a firm rest if available and use the self-timer setting so that you don't shake the camera while taking the picture;
-Set the F-stop to a high number (i.e., a small opening) such as F-16 or F-18;
-Adjust the shutter speed according to the light metering requirements and click the camera.
At night, flood lights or street lights and in daylight, try to turn the sun into a star-burst. For sun, you may be able get the effect with a hand-held camera.
But, there is precaution to be taken. When looking at the sun through your viewfinder, avoid damage to your eyes in order to compose my image. My advice would be to only take a few images and move on to minimize the risk of eye injury.