Well….. you actually cannot compare it. One is designed for a robust nature and the other one is a measure of a cost-effective solution.
Honestly speaking, there is no comparison between S7 300 and S7 1200. As they are completely from the different application domains.
S7-1200 is the successor of S7-200 plc. It can only be used with TIA portal software. MODBUS is the only communication protocol. It’s not fast. Limited input and output module. It is cost-effective. Cheaper in use but slower compare to S7-300 PLCs.
S7-1200 micro-controller got limited functionality and expandability. They are intended to use in a protected environment with no vibration and clean power.
S7-300 are more robust in nature which can be expanded to higher levels of I/O and memory capacity also can be extended to a reasonable length. The nature of the CPU is designed to handle more complex machines, processes and is suitable in any environmental conditions.
It is operable with the SIMATIC Manager and TIA portal as well. It has got more operable functions than S7-1200.

S7 300 can be used in the various application:-
-Standard application.
-The compact application where space and cost are a concern.
-Fail-safe application.

Three different ranges of S7-1200 CPUs are:-
-Standard CPUs
– Failsafe CPUs
-SIPLUS extreme CPUs
Source:- Siemens.de