If I play Guards! while it is hidden, can I play the sand soldier to base?
No, you cannot play the Sand Soldier token created by Guards! to your base.
According to Rule 811.1.d.3 of the Core Rules: "If a hidden spell or a play effect of a hidden permanent causes you to play a unit, you must choose to play that unit at that battlefield [where the card was hidden]."
Because Guards! is a spell with the Hidden keyword, when you play it from its facedown position, any units it creates must be played at the same battlefield where the Guards! card was hidden. This has been confirmed by RiftJudge FAQ #9273, #9517, and #8658, which all explicitly state that the token must enter play at that specific battlefield and cannot be played to your base.