Different plants need different amounts of sunlight, If you put a sun-loving plant in the shade, it will turn yellow from lack of chlorophyll and die. If you put a shade-loving plant in the sun, it will shrivel up and die. Every plant falls somewhere on a spectrum of full sun to full shade.
When choosing plants for a garden, first decide where you want your garden to be then look for plants that like that particular sun-to-shade ratio. Don't choose plants first then look for somewhere to put them.