In Arduino Pro Mini (3.3V) specs indicated the maximal and recommended current per pin, 40mA and 20mA respectively. Does these values means input current (i.e. safe input current Arduino can handle) or output current?
It is the amount of current the pin can source or sink when in OUTPUT mode.
That is, the amount of current that can flow from the pin to ground, or can flow from VCC into the pin.
You can understand it better if you learn how a GPIO pin works.
In datasheet, paragraph 32.1 is stated:
DC Current per I/O Pin 40.0mA
See comments below about the implication. (I will not delete this questions because of the useful comments below from Majenko and Milliways, unless downvoted).
Does these values means input current (i.e. safe input current Arduino can handle) or output current?
Depending on your definition of input.
The numbers are the max current that an output pin can provide , either flowing in or out of the pin.
The max current you can force into or out of an input pin is mostly determined by the clamp diodes. Typical a few ma.