The elastic stiffness tensors for wurtzite GaN and AlN show a significant hydrostatic pressure dependence, which is the evidence of nonlinear elasticity of these compounds. We have examined how pressure dependence of elastic constants for wurtzite nitrides influences elastic and piezoelectric properties of GaN/AlN planar superlattices and quantum dots. Particularly, we show that built-in hydrostatic pressure, present in both quantum wells of the GaN/AlN superlattices and GaN/AlN quantum dots, increases significantly by 0.3-0.7 GPa when nonlinear elasticity is used. Consequently, the compressive volumetric strain in quantum wells and quantum dots decreases in comparison to the case of the linear elastic theory. However, the z-component of the built-in electric field in the quantum wells and quantum dots increases considerably when nonlinear elasticity is taken into account. Both effects, i.e., a decrease in the compressive volumetric strain as well as an increase in the built-in electric field, decrease the band-to-band transition energies in the quantum wells and quantum dots.