To find the scale factor used to create the printed photo of the sandbox, we need to compare the lengths of a side in the actual sandbox to the lengths of a side in the printed photo.
The actual side length of the sandbox is 40 inches, and the side length in the photo is 4 inches.
To calculate the scale factor, we divide the length in the photo by the actual length:
\[ \text{Scale factor} = \frac{\text{Length in photo}}{\text{Actual length}} = \frac{4 \text{ inches}}{40 \text{ inches}} = \frac{1}{10} = 0.1 \]
Thus, the scale factor used to create the printed photo of the sandbox is \( \boxed{0.1} \).