The fundamental building block of a crystal is unit cell. Using single crystal XRD (for unknown structure) and powder X-ray diffraction, you can identify the type of the lattice. For powder XRD, using standard softwares like treor, powd, expo etc you can index the lattice, also you can estimate the size of the unit cell from its lattice parameter values. X-ray diffraction technique is useful for extended solids, for molecular structure NMR like technique can be used.
Upon reducing the size of the crystallites, the width of the XRD pattern will increase. There is a correlation between crystalline size and width of XRD patterns. To find the size of the nanoparticles, you can use Debye Scherrer formula
Molecular form don't have a crystaline state. That's why XRD don't work for investigation. HRTEM techniqu can be used for actual size of course the size is in sever nm. XRD also doesn't work on small nanoparticles particularly for sizes less than approximately 10nm since at this size their crystal structure is deforms.