You can create such an effect easily in post-processing but in fact it's possible and very simple to create it in camera as well (and frankly speaking I prefer achieving it this way). You just need to do following:
- Shoot with a wide-angle lens (eg. 16 or 24 mm),
- Make sure you use slow aperture (like f/13 or f/16 - the latter works best for me) because otherwise the effect won't be clearly visible (with very fast apertures it won't be visible at all),
- Make sure the light source doesn't fill whole frame or most of it (as the effect won't be visible in such a case), i.e. all light sources should be at some distance from the lens.
- Note: the number of stars' arms is very easy to predict. Each lens has a number of aperture blades (look in the specs). This number equals to the number of stars' arm this lens would produce. Canon 24-105 L has 8 aperture blades and that's why all "stars" in the image above have 8 arms.