Rare-earth phosphates have demonstrated superior properties as luminescent materials. However, relatively little research has been conducted on their use as linear or nonlinear crystal materials, and their potential is promising. In this study, Na3RE(PO4)2 (RE = La, Y) compounds were synthesized by using the flux method. Na3La(PO4)2 and Na3Y(PO4)2 crystallize in distinct space groups, both adopting a glaserite-like structure with varying degrees of functional unit distortion. Through structural investigation, the transition of the glaserite structure in A3RE(PO4)2 (A = alkali metal; RE = rare-earth metal) from trigonal to monoclinic was analyzed. It is found that A3RE(PO4)2 tends to crystallize in lower-symmetry space groups and form noncentrosymmetric structures when rare-earth ions exhibit more coordination modes or larger ionic radii. This result further enriches the A3RE(PO4)2 of studies, which will contribute to the design of novel rare-earth nonlinear optical materials. In addition, Na3La(PO4)2 exhibited excellent thermal stability in thermal property tests. Both compounds exhibited an ultraviolet cutoff edge below 200 nm. Additionally, the theoretical band gaps of the A3RE(PO4)2 series were calculated, demonstrating that this series of compounds are promising candidates for deep-ultraviolet optical materials.