This is easy to find out by Braggs law. The higher the diffraction angle, the smaller the distance of a specific lattice plane. The smaller the distance ...compression.
GN's answer is true for isotropic compression (such as a crystal under hydrostatic stress) . For all other cases (including unidirectional tension vs. unidirectional compression), the answer actually depends on the Miller index (i.e. the (hkl) value) of the diffraction peak you're looking at, and the alignment of your crystalline solid
Assuming for instance that you have a single crystal or fibrous crystal (with fiber direction in c-axis), and that your crystal's c-axis is aligned to the direction of uniaxial stress (which is what I'm assuming you mean by tensile vs. compressive), then if your peak is for example (002) (or in general, (00l) where l is nonzero), then a 2θ increase of that peak indicates that your crystal is indeed under *compressive stress*, like GN says. On the other hand, if the peak is (200) or (230) for instance (or in general, (hk0) where one of h or k is nonzero)), then a 2θ increase would mean your a- and/or b-axis of the crystal is narrowing, which would indirectly indicate that your crystal is under *tensile stress*.
(similar arguments will hold if your single crystal solid a-axis is aligned in the uniaxial stress direction, and likewise in the case of the b-axis)
If the peak is instead (h0l), (0kl), or (hkl) where h,k, and l are all non-zero, then it's not as straightforward to analyze. You would need to then provide the actual Miller index of the peak, the crystal lattice parameters (a, b, c dimensions and the angles), whether you have a single crystal, aligned crystal, etc, and the level of stress applied on the crystalline solid.
Bragg's Law: Differentiate Bragg' s law assuming that the wave length is invariant, and then rearrange the terms, one may write required formula to treat this problem for the orthorhombic system, which covers cubic and tetragonal systems. In the attached file I have derived a formula, which tells us that any thing increases the lattice parameter associated with a given h, k, l indices, then the corresponding contribution to the theta hkl angle will be negative [ - delta ahkl /ahkl ] ,