Very recently, a new type of two-dimensional layered material MoSi2N4 has been fabricated, which is semiconducting with weak interlayer interaction, high strength, and excellent stability. We systematically investigate theoretically the effect of vertical strain on the electronic structure of MA2Z4 (M=Ti/Cr/Mo, A=Si, Z=N/P) bilayers. Taking bilayer MoSi2N4 as an example, our first principle calculations show that its indirect band gap decreases monotonically as the vertical compressive strain increases. Under a critical strain around 22%, it undergoes a transition from semiconductor to metal. We attribute this to the opposite energy shift of states in different layers, which originates from the built-in electric field induced by the asymmetric charge transfer between two inner sublayers near the interface. Similar semiconductor to metal transitions are observed in other strained MA2Z4 bilayers, and the estimated critical pressures to realize such transitions are within the same order as semiconducting transition metal dichalcogenides. The semiconductor to metal transitions observed in the family of MA2Z4 bilayers present interesting possibilities for strain-induced engineering of their electronic properties.