Suspected problems. If you ob/gyn doctor or maternal fetal medicine specialist recommend a fetal echocardiogram, it is usually because they suspect some sort of malformation in the fetuses heart, lungs, etc. It may be because they notice something on a prior ultrasound, or they just want to be safe/cautious if you are at a higher risk of having a baby with a congenital heart problem.
History/findings. If you had diabetes mellitus before your pregnancy, if you or a prior infant have congenital heart defects, if you were exposed to phenytoin/warfarin/ace-inhibitors/valproate/ssris/lithium periconceptionally, if you are morbidly obese and/or if a fetal comprehensive sonogram is abnormal or suspicious for cardiac anomalies (per mfm or radiologist), then a fetal echo is warranted to know for sure.