There are many problems with that circuit, of which the most important is it is not isolated from mains. A transformer will provide you with isolation. If you mount the Atmega in a plastic box, then it might be safe to use, but you will not be able to work on it safely, unless you use isolated equipment and are a careful engineer. You wouldn't be able to interface it to anything safely or easily either, at least not without using opto-couplers or something similar.
These days, it's far better to buy a small 5v plug-top power supply, isolated, ready made, high current output (1A/2A), waste of time to do anything else.
But if you want some critique of that circuit ...
C1 must be an X2 type capacitor. Mains will have large transients on it, often to 1500V. An X2 capacitor is rated to handle these safely.
R1 is far too big, and will get hotter than it needs to. Its only function is reduce the inrush current when first switched on, to below the withstanding of the D1 bridge. If they are 1N4004 class devices, able to take a 30A surge, then R1 could be as small as 10 ohms, though 100 ohms might be kinder. Check the single cycle surge rating of the bridge you are using, and adjust R1 accordingly.
R1 needs to be a high voltage type, most 'ordinary grade' resistors are 200v max. Alternatively, you can use several equal value ones in series to increase the voltage rating.
The efficiency, in output power per metered input power, is not too bad, as most of the input voltage is dropped across the non-dissipating C1, as long as R1 is not excessive, as it is here.
To put some actual numbers on it, C1 = 220nF at 50Hz (I assume, as it's 230v) will have an impedance of about 14.5k. Together with R1, their total impedance will be about 17.5k (they are in quadrature remember), giving an rms current at 230v of about 13mA. That will dissipate 1.7W in R1, and deliver an average output DC current of around 11mA. That doesn't sound much juice to power your Atmega, if you want to light any LEDs. With no load on the output, that will dissipate about 56mW in D2.