I have gotten a sun stone but I don't know how and where to use it?
Sun stone is one among the Evolution stones. It helps us to evolve compatible Pokémon.
Gloom ☞ Bellossom
Sunkern ☞ Sunflora
Cottonee to ☞ Whimsicott
Petilil ☞ Lilligant
Helioptile ☞ Heliolisk
Please see this page for information about stones.
A sun stone is used to evolve 2 different pokemon.