To find the scale factor used to create the printed photo of the sandbox, we need to compare the lengths of the sides of the actual hexagon to the lengths of the sides in the photo.
The sides of the actual sandbox are 40 inches long, while the sides of the hexagon in the photo are 4 inches long.
The scale factor is calculated as follows:
\[ \text{Scale Factor} = \frac{\text{Length in the photo}}{\text{Actual Length}} = \frac{4 \text{ inches}}{40 \text{ inches}} \]
Calculating this gives:
\[ \text{Scale Factor} = \frac{4}{40} = \frac{1}{10} = 0.1 \]
Therefore, the scale factor used to create the printed photo of the sandbox is \( \boxed{0.1} \).