In this paper, responses of a single pile embedded in sand soil (loose and dense) under dynamic loading (sinusoidal dynamic vibrations of 0.1 g to 0.5 g) have been investigated by two-dimensional analysis using the finite element method (FEM). Viscous (dashpot) boundaries have been used for taking the boundary effects of far-field into account. The applicability and accuracy of site responses of two-dimensional analysis due to the FEM modelling have been well verified with one-dimensional site responses. The results indicate that the relative density of sand (loose, dense) becomes prominent for the displacements of the pile, specifically under the frequency effects of resonance. While the pile in loose sand causes the displacements of 0.1 m to 0.5 m, the pile in dense sand leads to the displacements of 0.05 m to 0.25 m, proportionally with the dynamic loads from 0.1 g to 0.5 g. Moreover, the displacements reach their peak value at the frequency ratio of the resonance case. Viscous boundaries are found sufficient for modelling excessive displacements due to dynamic loading. However, the displacements reveal that high vibrations (> 0.1 g for loose sand, > 0.2 g for dense sand) influencing the pile deformations are critical for the issues of settlements. This is more significant for the resonance case in order for ensuring sufficient design. Consequently, the findings from the study are promising good contributions for pile design under the dynamic effect.