The crystal structure analyses of 2,4-dinitro-3',4'-methylenedioxystilbene and 2,4-dinitro-3',4',5'-trimethoxystilbene have been carried out. Even though both the structures consist of molecular layers, the former crystallizes in a centrosymmetric space group, and the latter adopts a noncentrosymmetric structure. Rationale for the formation of these layers and their subsequent difference in stacking is presented in terms of the C-H ... O interactions and nonplanarity of the molecular structure. The semiempirical calculations indicated that the hyperpolarizability varies a little (<3%) for a 20-degrees rotation in the stilbene backbone. Due to a nonoptimal alignment of dipole in crystal, the dinitrotrimethoxystilbene is feebly SHG active in the powder state (0.2 X urea). Packing energy calculations and analyses of the X-ray powder patterns suggested the possible existence of another form of the dinitromethylenedioxystilbene. Crystal packing analyses of methylenedioxy, trimethoxy, and nitro groups reveal the importance of orientational effects and molecular nonplanarity in the generation of noncentrosymmetric crystal packing.