First of all, you have to decide what type of music you want to play using your electric guitar. The type of music that you prefer can help you narrow down the number of guitar choices. For example, jazz, blues, or country, may point you toward a semi-hollow body, like a Gibson ES-355 or an Ibanez AF-95. Classic rock, blues, or metal might lean more towards a solid body guitar like the Gibson SG or Fender Telecaster.
Choose the sound that you are interested in. Do you like the '50s style of say, Brian Setzer or the blues tone of B.B. King? If so, you should choose a hollow or semi-hollow body. Maybe you’re a fan of Eric Clapton or Stevie Ray Vaughn. If so, the thinner sound of a Fender Stratocaster would suit you. A classic rock fan or a new rock listener that prefers a fatter, longer and sustaining sound may want to choose a Gibson Les Paul.
The features that you want on a guitar can also be determined by the sound and tone that you want to get from your guitar. The pickup type and layout affect the sound and flexibility of tones for a guitar. There are generally two types of pickups, single coil and hum-bucker (which looks like two single coils next to each other. Single coils tend to sound thinner, hum-buckers sound a bit fatter. Some hum-buckers can be turned into a single coil with a switch on the guitar.
The positions of the pickups affect the tone as well. Pickups that are closer to the neck of the guitar will have a little more bass tone. These are usually used for cords/rhythm playing. Pickups that are closer to the bridge will have a little more treble tone and will sound brighter. These are usually used for lead/solo playing. For a wide range of sounds choose a guitar that has multiple pickups, switches to control the pickups, and tone controls on the guitar body. One classic example is the Fender American Deluxe Stratocaster. It has single coils at the neck and in the middle position and a hum-bucker near the bridge. It has a 5 position switch for selecting the pickups that are used.
If you are interested in dive bombs during solos, wide tremolos, and possibly pulling up to really high notes, you should look for a guitar with a whammy bar. These can be simple bridges that can only be pushed down to lower notes or they can be fully "floating", where the bridge balances between the string tension and some springs. A floating bridge can dive bomb or be pulled up. Floyd Rose was famous for floating bridges. One complaint by some guitarists is that floating bridges will not be able to sustain notes as long as solid bridges because some vibration is lost to the springs. Some guitars will have a string locking mechanism by the tuning keys to help keep the guitar return to tune after using the whammy bar.
The look of your guitar is also important. You want to look good and look the part for your type of music. You might look funny playing a B.C. Rich Warlock at a light jazz concert. Look online for pictures of different brands of guitars. Check out the guitars played by your favorite musicians.
Read some guitar reviews online and in guitar magazines. This will help you get some better ideas on what other guitarists are playing. Compare these guitars with your budget to narrow your choices.
You can consider going to the local music store and checking out some guitars. This is a very important step. A guitar may look great, have great reviews, and meet all of your requirements, but may not work well for you. Each guitar will have a different feel. The neck width, thickness, radius, and materials vary. The weight, weight distribution, and size will vary. Make sure that you feel comfortable playing the guitar!
Choose an amp that is most like yours to test the guitars. If you don't own an amp, discuss your music style(s) with the salesperson at the store. They can help you choose an amp for testing. Play some music. Change the pickup settings, tone controls, volume settings, and amp settings to see how the tone and sound can vary.
Hopefully your final selection meets all of your criteria and fits your budget. If not, start saving or compromise. If so, negotiate pricing and add-ons (strings, picks, cables, case, etc.).