We present the electronic and magnetic properties of two dimensional (2D) MPX3 (M= transition metal, and X = S, Se, Te) transition metal thiophosphates. The MPX3 are layered van der Waals materials and exhibit novel magnetic order as a single layer. Our calculations of the magnetic ground states in MPX3 single layer compounds predict semiconducting phases with variable band gap sizes down to metallic phases depending on their magnetic orders. A systematic trend of decreasing band gaps in antiferromagnetic states is observed as the chalcogen atoms S, Se, and Te change from smaller to larger atomic number, whereas diverse ground-state phases, e.g., ferromagnetic, antiferromagnetic, and nonmagnetic phases can be expected for different compounds which are accompanied by variations in the lattice constants, and non-negligible distortions in crystal symmetries. In addition, the antiferromagnetic semiconductors of MPX3 single layer show the transition to the ferromagnetic halfmetals with both electron and hole doping, which can be controlled by applying an external gate voltage in the MPX3 field effect transistors (FET). We find that the itinerant d electrons in transition metals induce the ferromagnetic to antiferromagnetic transition accompanied by the metal to semiconductor transition. The sensitive interdependence between the magnetic, structural, and electronic properties suggest important potential of 2D magnetic van der Waals materials for strain and field-effect carrier tunable spintronics.