How should I attach a desk to a wall on one end?
If I understand what you're describing, I'd suggest using angle iron rather than L-brackets.  The attachment of the angle iron to the wall has to be strong, you'd want to hit at least two studs, use strong fasteners, washers, etc.  The attachment of the angle iron to the tabletop would depend on what material the tabletop is made of, but you'd want to use enough screws to make it secure.