Assuming that you're talking about your partial weekly water change (or however often you do routine maintenance) rather than a complete makeover- yes, it's much better to do it with the fish in the tank; they don't tend to mind much, but most fish are stressed by netting and moving, so you want to avoid that.
What I do is:
get a 10 ltr bucket or two ready for clean water (depending on how much I'm going to replace); add 1 part boiling water to 9 parts cold tap water; add dechlorinator and swish around
switch off all tank electrics and place an empty bucket or two beside the tank
lift out any ornaments I intend to clean under (but leave plants in place)
get my gravel vac (piece of plastic pipe attached to syphon) and insert the broad end in the water, the other in the bucket; move the water end up and down to get water flowing through the pipe into bucket; once the suction is working gently hoover the gravel with broad end trying to avoid sucking up my fish
when the bucket fills up, I put my thumb over the end going into bucket and just move it to the next one. I tend to take out 25% once a week.
change or rinse out filter floss (not all tanks have it) in dirty water in bucket
once a month or so rinse out filter sponge (not all at the same time if you have several) in dirty bucket
put ornaments back, careful not to crush any fish
pour in clean water using plastic measuring jug (reserved for fishkeeping)
replace lid and switch electrics back on
You don't have to have separate buckets for clean and dirty; I just find it handy to have everything set out and being able to move in one flow; also, with multiple tanks, it means there is no risk of contamination
The whole procedure takes about an hour on my three tanks, but that includes boiling the kettle, which may not actually be that necessary.