Why were the fronts of the Messerschmitt Me-109 painted yellow?
You're right that the yellow tactical markings were used in order to reduce the friendly fire incidents (similar to the Allied D-Day stripes). As noted by Alan W. Hall in Messerschmidt Bf 109 warpaint:


  Quick identification has always been a necessity in aerial conflict ... Channel front fighters of the Luftwaffe started carrying yellow cowl and rudder markings. Some painted the entire cowling forward of the windscreen yellow, while others just painted the undersides of the cowling.


The image below shows some of the various tactical markings used at the time.



Bf 109 tactical markings; image from asisbiz.com

While the yellow paint seems to have been used before, it saw widespread use from August 1940 during Battle of Britain, and was used in some cases in other theaters too. Also, other aircraft like FW 190 also used some variations, like the yellow painted rudder.