Trainer level affects how far you can power up a pokemon. For example a trainer who is level 5 that powers up a pokemon until it can be powered up no more (the CP arc will be all the way on the right), has a level 6.5 pokemon.
But that doesn't mean it will be stronger than the same pokemon that is only half way on the CP arc for a level 30 trainer, because that means that pokemon will be around level 15.
Also you should evolve a pokemon first rather than spending stardust powering it up first, because stardust is what limits you from powering up all your pokemon to the max when you get to the high levels, not candies.
If you evolve a pokemon and it ends up not having good IVs or a good moveset, you've only spent candies. If you've powered it up, then evolve it and it doesn't turn out the way you want, you've wasted even more candies, and you've also wasted stardust.