How to drill a hole safely?
There is no set standard height, but this is generally a pretty safe operation.  

You'll want to use a stud finder to locate the studs, and attach the shelf brackets to studs for strength.  

You'll  usually only hit a pipe or power in a stud if it runs through the stud horizontally.  Modern building codes require a piece of heavy sheet metal be installed on the face of the studs where pipes and cables pass through.  They also require the pipe or cable to be set back from the face of the stud a bit.  

So if the building is fairly modern, and the plumbers / electricians followed the rules, you should be safe - if you try to screw into the stud where there's a pipe or cable, you'll hit the plate and the screw won't go in.  

There is no guarantee that the plumber / electrician followed the rules, and nothing's perfectly safe, but this is generally a pretty safe project.