Exciting electrons in solids with intense light pulses offers the possibility of generating new states of matter through nonthermal means and controlling their macroscopic properties on femto- to picosecond timescales. One way to manipulate a solid is by altering its lattice structure, which often underlies the electronic, magnetic and other phases. Here, we review how structures of solids are affected by photoexcitation and how their ultrafast dynamics are captured with time-resolved electron diffraction and microscopy. Specifically, we survey how a strong light pulse has been used to tailor the nonequilibrium characteristics to yield on-demand properties in various material classes. In the existing literature, four main routes have been exploited to control material structures: (i) phase competition, (ii) electronic correlations, (iii) excitation of coherent modes, and (iv) defect generation. In this review, we discuss experiments relevant to all four schemes and finish by speculating about future directions.